J
James Coglan
[Note: parts of this message were removed to make it a legal post.]
Hi list,
I've got a bit of a problem whereby I need to pass a block to a method
defined using define_method this works:
def some_method(*args, &block)
# ...
end
but this does not -- the interpreter complains about unexpected ampersands:
define_method
some_method) do |*args, &block|
# ...
end
Is there any way to make this work? I'm doing something a little meta, so I
don't know the name of the method or the number of arguments, so it's all
got to be dynamic.
Hi list,
I've got a bit of a problem whereby I need to pass a block to a method
defined using define_method this works:
def some_method(*args, &block)
# ...
end
but this does not -- the interpreter complains about unexpected ampersands:
define_method
# ...
end
Is there any way to make this work? I'm doing something a little meta, so I
don't know the name of the method or the number of arguments, so it's all
got to be dynamic.