Skip to content

Commit

Permalink
Properly test this and make it asserts since it should never fail.
Browse files Browse the repository at this point in the history
Fixes #4880.
  • Loading branch information
headius committed Dec 5, 2017
1 parent 78146d5 commit fab6c5a
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -136,9 +136,12 @@ public static Class createRealImplClass(Class superClass, Class[] interfaces, Ru
Map<String, List<Method>> simpleToAll = buildSimpleToAllMap(interfaces, superTypeNames, rubyClass);

Class newClass = defineRealImplClass(ruby, name, superClass, superTypeNames, simpleToAll);
if (!newClass.isAssignableFrom(interfaces[0])) {
new RuntimeException(newClass.getInterfaces()[0].getClassLoader() + " " + interfaces[0].getClassLoader());

// Confirm all interfaces got implemented
for (Class ifc : interfaces) {
assert ifc.isAssignableFrom(newClass);
}

return newClass;
}

Expand Down

0 comments on commit fab6c5a

Please sign in to comment.