Is anyone currently working on or have any ideas regarding the
implementation of Module::module_function?
(this is where I’m currently stuck in trying to execute setup.rb for
module_function is meant to take a list of names of instance methods and
make then also callable as class (or singleton) methods.
It’s easy enough to locate the existing methods using something like:
RubyMethodInfo method =
(BTW, why doesn’t ResolveMethod return a RubyMethodInfo?)
However, I’m not entirely sure how to programmatically create a new
(in Ruby.NET we had a helper method that would create a singleton for a
module if one didn’t already exist, but I’m not sure what the equivalent
of this is in IronRuby)
Anyway, it seems that invoking:
creates a new method in the right place (provided SingletonClass has
been properly initialized).
However, when I try calling such a method as a class method I get a
wrong number of arguments exception, presumably because different
parameters are expected depending on whether it is called as an instance
method or as a class method.