Skip to content

Commit

Permalink
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -21,6 +21,10 @@ public StaticMethodInvoker(RubyClass host, Method method) {
super(host, method);
}

public StaticMethodInvoker(RubyModule host, Method method) {
super(host, method);
}

@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) {
JavaMethod method = (JavaMethod) findCallable(self, name, args, args.length);
Original file line number Diff line number Diff line change
@@ -37,6 +37,8 @@ public static RubyModule createJavaInterfaceTemplateModule(ThreadContext context
singleton.addReadAttribute(context, "java_class");
singleton.defineAnnotatedMethods(JavaInterfaceTemplate.class);

JavaInterfaceTemplate.defineAnnotatedMethods(Java.JavaProxyClassMethods.class);

return JavaInterfaceTemplate;
}

4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/javasupport/Java.java
Original file line number Diff line number Diff line change
@@ -676,10 +676,10 @@ public static IRubyObject java_alias(ThreadContext context, IRubyObject clazz, I

private static IRubyObject getRubyMethod(ThreadContext context, IRubyObject clazz, String name, Class... argTypesClasses) {
final Ruby runtime = context.runtime;
if ( ! ( clazz instanceof RubyClass ) ) {
if ( ! ( clazz instanceof RubyModule ) ) {
throw runtime.newTypeError(clazz, runtime.getModule());
}
final RubyClass proxyClass = (RubyClass) clazz;
final RubyModule proxyClass = (RubyModule) clazz;

final Method method = getMethodFromClass(context, clazz, name, argTypesClasses);
final String prettyName = name + CodegenUtils.prettyParams(argTypesClasses);

0 comments on commit 563c402

Please sign in to comment.