Skip to content

Commit 1ab7395

Browse files
committed
[Truffle] String#to_str now works properly.
1 parent 7fdec90 commit 1ab7395

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

spec/truffle/tags/core/string/to_str_tags.txt

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

truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ public Object toI(RubyString string) {
17161716
}
17171717
}
17181718

1719-
@CoreMethod(names = "to_s")
1719+
@CoreMethod(names = { "to_s", "to_str" })
17201720
public abstract static class ToSNode extends CoreMethodNode {
17211721

17221722
public ToSNode(RubyContext context, SourceSection sourceSection) {

truffle/src/main/ruby/core/string.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@
1111

1212
class String
1313

14-
def to_str
15-
self
16-
end
17-
1814
end

0 commit comments

Comments
 (0)