Skip to content

Commit 99c15bf

Browse files
rwstaunermanefzpatricklinpl
committed
Remove origin check for UnboundMethod#==
We're only concerned with where the method was declared (rather than the receiver of the instance_method call). See ruby/ruby#6855 and https://bugs.ruby-lang.org/issues/18798 Co-authored-by: Manef Zahra <manef.zahra@shopify.com> Co-authored-by: Patrick Lin <patrick.lin@shopify.com>
1 parent 90bfaa0 commit 99c15bf

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

spec/tags/core/unboundmethod/equal_value_tags.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/main/java/org/truffleruby/core/method/UnboundMethodNodes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public abstract static class EqualNode extends CoreMethodArrayArgumentsNode {
5252

5353
@Specialization
5454
boolean equal(RubyUnboundMethod self, RubyUnboundMethod other) {
55-
return self.origin == other.origin &&
56-
MethodNodes.areInternalMethodEqual(self.method, other.method);
55+
return MethodNodes.areInternalMethodEqual(self.method, other.method);
5756
}
5857

5958
@Specialization(guards = "!isRubyUnboundMethod(other)")

0 commit comments

Comments
 (0)