@@ -445,9 +445,9 @@ private Method getMethod(ThreadContext context, String name, Class... argTypes)
445
445
446
446
private MethodInvoker getMethodInvoker (Method method ) {
447
447
if (Modifier .isStatic (method .getModifiers ())) {
448
- return new StaticMethodInvoker (metaClass .getMetaClass (), method );
448
+ return new StaticMethodInvoker (metaClass .getMetaClass (), method , method . getName () );
449
449
} else {
450
- return new InstanceMethodInvoker (metaClass , method );
450
+ return new InstanceMethodInvoker (metaClass , method , method . getName () );
451
451
}
452
452
}
453
453
@@ -623,12 +623,12 @@ public static IRubyObject java_alias(ThreadContext context, IRubyObject clazz, I
623
623
final MethodInvoker invoker ;
624
624
625
625
if ( Modifier .isStatic ( method .getModifiers () ) ) {
626
- invoker = new StaticMethodInvoker (proxyClass .getMetaClass (), method );
626
+ invoker = new StaticMethodInvoker (proxyClass .getMetaClass (), method , newNameStr );
627
627
// add alias to meta
628
628
proxyClass .getSingletonClass ().addMethod (newNameStr , invoker );
629
629
}
630
630
else {
631
- invoker = new InstanceMethodInvoker (proxyClass , method );
631
+ invoker = new InstanceMethodInvoker (proxyClass , method , newNameStr );
632
632
proxyClass .addMethod (newNameStr , invoker );
633
633
}
634
634
@@ -646,11 +646,11 @@ private static AbstractRubyMethod getRubyMethod(ThreadContext context, IRubyObje
646
646
final String prettyName = name + CodegenUtils .prettyParams (argTypesClasses );
647
647
648
648
if ( Modifier .isStatic ( method .getModifiers () ) ) {
649
- MethodInvoker invoker = new StaticMethodInvoker (proxyClass , method );
649
+ MethodInvoker invoker = new StaticMethodInvoker (proxyClass , method , name );
650
650
return RubyMethod .newMethod (proxyClass , prettyName , proxyClass , name , invoker , clazz );
651
651
}
652
652
653
- MethodInvoker invoker = new InstanceMethodInvoker (proxyClass , method );
653
+ MethodInvoker invoker = new InstanceMethodInvoker (proxyClass , method , name );
654
654
return RubyUnboundMethod .newUnboundMethod (proxyClass , prettyName , proxyClass , name , invoker );
655
655
}
656
656
0 commit comments