General

Profile

anuraguniyal (anurag uniyal)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 1 2

Activity

06/05/2017

09:32 PM Ruby Bug #12642: Net::HTTP populates host header incorrectly when using an IPv6 Address
Below monkey patching code works for me. Is there a better way?
~~~ ruby
module MonkeyPatch
module Net
module HTTP
end
end
end
module MonkeyPatch::Net::HTTP
# workaround for https://bugs.ruby-lang.org/issues/12...
anuraguniyal (anurag uniyal)

06/03/2017

01:07 AM Ruby Bug #12642: Net::HTTP populates host header incorrectly when using an IPv6 Address
Is there a workaround for this? How should we connect to ipv6 servers? anuraguniyal (anurag uniyal)

05/07/2013

03:01 AM Ruby Feature #8366: Exception.message take time to execute depending on the instance variables
nobu (Nobuyoshi Nakada) wrote:
> You should define inspect method.
But it is not practical to define inspect on all the classes I write or add inspect to all third party code or plugins I use, easier and better solution would be to ...
anuraguniyal (anurag uniyal)

05/04/2013

04:02 PM Ruby Feature #8366: Exception.message take time to execute depending on the instance variables
nobu (Nobuyoshi Nakada) wrote:
> You can see the reason by reducing the size of the instance variable.
What do you mean? I have a big project where I load plugins and each plugin can have megabytes of data and if one plugin does not ...
anuraguniyal (anurag uniyal)
08:16 AM Ruby Feature #8366: Exception.message take time to execute depending on the instance variables
also tried with ruby 2.0.0 at http://www.compileonline.com/execute_ruby_online.php anuraguniyal (anurag uniyal)
08:11 AM Ruby Feature #8366 (Open): Exception.message take time to execute depending on the instance variables
I am seeing very interesting and catastrophic behavior with ruby, see the code below
class ExceptionTest

def test
@result = [0]*500000

begin
no_such_method
rescue Exception ...
anuraguniyal (anurag uniyal)

03/16/2013

10:00 AM Ruby Bug #8091: Class.new is not called when class is created using class keyword
alexeymuranov (Alexey Muranov) wrote:
> I think partial overloading can be done by defining the `initialize` private method.
no initilize is called on `class X` that is why it is a bug
anuraguniyal (anurag uniyal)
10:00 AM Ruby Bug #8091: Class.new is not called when class is created using class keyword
Initialize is also not called on `class X` but it is called on `Class.new`
class Class
alias old_initialize initialize
def initialize(*args)
obj = old_initialize *args
print "initialize",obj,"\n"
...
anuraguniyal (anurag uniyal)

03/15/2013

03:15 AM Ruby Bug #8091: Class.new is not called when class is created using class keyword
nobu (Nobuyoshi Nakada) wrote:
> Correct, not a bug.
Why this is not a bug if classes created differently have different creation mechanism, question is why Class.new is not called when class is created?
anuraguniyal (anurag uniyal)
03:13 AM Ruby Bug #8091: Class.new is not called when class is created using class keyword
marcandre (Marc-Andre Lafortune) wrote:
> Note that if you need to detect class creation, that can be done using the `inherited` callback.
I don't want to detect class creation I wan to overload new, which should be possible, at-leas...
anuraguniyal (anurag uniyal)

Also available in: Atom