DynamicMethod m = createDynamicMethod((RubyModule) module);
((RubyModule) module).addMethod(methodName.asJavaString(), m);
return context.getRuntime().getNil();
}
protected DynamicMethod createDynamicMethod(RubyModule module) {
return new DynamicMethod(module, Visibility.PUBLIC, CallConfiguration.NO_FRAME_NO_SCOPE) {
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
arity.checkArity(context.getRuntime(), args);
return invoke(context, args);