myhandler = MyHandler.new "abcd"
ArgumentError: wrong number of arguments (0 for 1)
from (irb):18:in `initialize'
from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/em/connection.rb:55:in
`block in new'
from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/em/connection.rb:49:in
`instance_eval'
from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/em/connection.rb:49:in
`new'
--------------------------
AFAIK the problem is in Connection.new:
--------------------------
# Override .new so subclasses don't have to call super and can ignore
# connection-specific arguments
#
def self.new sig, *args
allocate.instance_eval do
# Store signature
@signature = sig
# associate_callback_target sig
# Call a superclass's #initialize if it has one
initialize(*args)
# post initialize callback
post_init
self
end
end
--------------------------
Ok, but this workaround in the "new" method does not allow the above
very simple usage :(
--
Iñaki Baz Castillo
<i...@aliax.net>
Aman
> --
> You received this message because you are subscribed to the Google Groups "EventMachine" group.
> To post to this group, send email to eventm...@googlegroups.com.
> To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.
>
Ok, I was trying it for an "experiment" :)
Thanks for clarifying it.