Skip to content

Commit eb30bfe

Browse files
committed
Always split String#split and Truffle::Splitter.split
1 parent 3a28897 commit eb30bfe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def split(string, pattern, limit, &orig_block)
8888

8989
orig_block ? string : result
9090
end
91+
Truffle::Graal.always_split(instance_method(:split))
9192

9293
private
9394

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ def scan(pattern, &block)
320320
def split(pattern = nil, limit = undefined, &block)
321321
Truffle::Splitter.split(Primitive.dup_as_string_instance(self), pattern, limit, &block)
322322
end
323+
Truffle::Graal.always_split(instance_method(:split))
323324

324325
def squeeze(*strings)
325326
str = Primitive.dup_as_string_instance(self)

0 commit comments

Comments
 (0)