Skip to content

Commit 0303464

Browse files
authored
Merge pull request #9254 from headius/data_equality
Compare "real" classes for Data#== and eql?
2 parents 53eca6d + a4e812c commit 0303464

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private static IRubyObject checkDataEquality(ThreadContext context, RubyBasicObj
443443
if (selfObj == otherObj) return context.tru;
444444
RubyClass metaClass = otherObj.getMetaClass();
445445
if (!metaClass.isKindOfModule(context.runtime.getData())) return context.fals;
446-
if (metaClass != selfObj.getMetaClass()) return context.fals;
446+
if (metaClass.getRealClass() != selfObj.getMetaClass().getRealClass()) return context.fals;
447447
// if (RSTRUCT_LEN(s) != RSTRUCT_LEN(s2)) {
448448
// rb_bug("inconsistent struct"); /* should never happen */
449449
// }

0 commit comments

Comments
 (0)