Skip to content

Commit

Permalink
Merge branch 'interface_returns_ruby_obj'
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jun 12, 2018
2 parents 13130e2 + ff90e42 commit 459b812
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -822,12 +822,13 @@ public static void coerceResultAndReturn(SkinnyMethodAdapter mv, Class returnTyp
}
}
} else {
// if the return type is not an IRubyObject implementer, coerce to that type before casting
if (!IRubyObject.class.isAssignableFrom(returnType)) {
mv.ldc(Type.getType(returnType));
mv.invokeinterface(
p(IRubyObject.class), "toJava", sig(Object.class, Class.class));
mv.checkcast(p(returnType));
}
mv.checkcast(p(returnType));
mv.areturn();
}
} else {
Expand Down

0 comments on commit 459b812

Please sign in to comment.