Skip to content

Commit e275004

Browse files
committed
[GR-26134] Stop systematically splitting String#to_sym.
PullRequest: truffleruby/1984
2 parents 3a9cc9e + 085b2fa commit e275004

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/main/java/org/truffleruby/core/string/StringNodes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@
172172
import org.truffleruby.language.control.RaiseException;
173173
import org.truffleruby.language.dispatch.DispatchNode;
174174
import org.truffleruby.language.library.RubyLibrary;
175-
import org.truffleruby.language.methods.Split;
176175
import org.truffleruby.language.objects.AllocateHelperNode;
177176
import org.truffleruby.language.objects.WriteObjectFieldNode;
178177
import org.truffleruby.language.yield.YieldNode;
@@ -2487,7 +2486,7 @@ public boolean isStringSubclass(RubyString string) {
24872486

24882487
}
24892488

2490-
@CoreMethod(names = { "to_sym", "intern" }, split = Split.ALWAYS)
2489+
@CoreMethod(names = { "to_sym", "intern" })
24912490
@ImportStatic({ StringCachingGuards.class, StringGuards.class, StringOperations.class })
24922491
public abstract static class ToSymNode extends CoreMethodArrayArgumentsNode {
24932492

test/truffle/compiler/pe/core/string_pe.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,3 @@
7272

7373
example "14.to_s.length", 2
7474
counter example "14.to_s.getbyte(0)" # Doesn't work becuase the bytes are only populated on demand and so aren't constant
75-
76-
example "'TO_SYM'.to_sym", :TO_SYM

0 commit comments

Comments
 (0)