Skip to content

Commit eb1c0b2

Browse files
committed
[fix] regression calling static hash() method on Java proxy
1 parent dcf8f26 commit eb1c0b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/org/jruby/RubyModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,6 +3206,7 @@ public int hashCode() {
32063206

32073207
// may be null during boot
32083208
if (metaClass == null) return id;
3209+
if (getJavaProxy()) return id; // do not attempt to dispatch to a `JavaClass.hash()` method
32093210

32103211
Ruby runtime = metaClass.getClassRuntime();
32113212

0 commit comments

Comments
 (0)