Skip to content

Commit 8fda2d7

Browse files
authored
Use private lookup for these handles (#113)
publicLookup seems to have trouble when there are multiple versions of a signature class in the classloader hierarchy. Fixes #112
1 parent 94d4d67 commit 8fda2d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)