Skip to content

Commit 98aceb0

Browse files
committed
Use private lookup for these handles
publicLookup seems to have trouble when there are multiple versions of a signature class in the classloader hierarchy. Fixes ruby#112
1 parent 94d4d67 commit 98aceb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/java/org/jruby/ext/stringio/StringIO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ public IRubyObject write(ThreadContext context, IRubyObject[] args) {
15291529

15301530
static {
15311531
MethodHandle cat, modify, substr;
1532-
MethodHandles.Lookup lookup = MethodHandles.publicLookup();
1532+
MethodHandles.Lookup lookup = MethodHandles.lookup();
15331533
try {
15341534
cat = lookup.findVirtual(RubyString.class, "catWithCodeRange", MethodType.methodType(RubyString.class, RubyString.class));
15351535
modify = lookup.findVirtual(RubyString.class, "modifyAndClearCodeRange", MethodType.methodType(void.class));

0 commit comments

Comments
 (0)