Im trying to pass a method as a parameter to method_2, execute this one and return the result:
def method_2( method_p, param ) res = method(method_p).call(param) return res end def method_1 klass = MyKlass.instance return method_2( klass.foo, "test" ) end this's MyKlass file:
class MyKlass def foo(param) param+param end end All I got is an error
wrong number of arguments (0 for 1)