Skip to content

Commit faebb64

Browse files
rwstaunermanefzpatricklinpl
committed
Use owner module from UnboundMethod#inspect
Co-authored-by: Manef Zahra <manef.zahra@shopify.com> Co-authored-by: Patrick Lin <patrick.lin@shopify.com>
1 parent 99c15bf commit faebb64

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

spec/tags/core/unboundmethod/inspect_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/tags/core/unboundmethod/to_s_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,6 @@ RubySymbol name(RubyUnboundMethod unboundMethod) {
133133

134134
}
135135

136-
@Primitive(name = "unbound_method_origin")
137-
public abstract static class OriginNode extends PrimitiveArrayArgumentsNode {
138-
139-
@Specialization
140-
RubyModule origin(RubyUnboundMethod unboundMethod) {
141-
return unboundMethod.origin;
142-
}
143-
144-
}
145-
146136
@CoreMethod(names = "original_name")
147137
public abstract static class OriginalNameNode extends CoreMethodArrayArgumentsNode {
148138

src/main/ruby/truffleruby/core/unbound_method.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class UnboundMethod
1212
def inspect
13-
Truffle::MethodOperations.inspect_method(self, Primitive.unbound_method_origin(self), owner)
13+
Truffle::MethodOperations.inspect_method(self, owner, owner)
1414
end
1515
alias_method :to_s, :inspect
1616

0 commit comments

Comments
 (0)