-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
JRuby version 9.3.13.0
Platform 6.5.13-1rodete2
Expected behavior:
- There is a class
org.example.Cwhich is in a jar which is not on the class path, call thisC_jar - There is a class
org.example.Cwhich is in a jar which is on the class path, call thisC_classpath C_jaris loaded viaURLClassLoaderand instantiated in Java code. This is done to isolate the different versions ofC.- Use Ruby to evaluate an object expression which results in an instance of an object with the class
C_jar - Use the
Javamodule to reference the classC, expecting to getC_classpath(i.e.Java::OrgExample::C)
Actual behavior:
- Using the
Javamodule syntax to accessCresults inC_jar
Workaround:
- Use the
Javamodule syntax to accessCbefore any Ruby expression which evaluates to an object of classC_jar
In Java.java, generateClassProxy calls addToJavaPackageModule without checking the class loader of the class it generated a proxy for. Effectively, manipulating values from non-JRubyClassLoader classes pollutes the Java module with incompatible classes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels