string.rb (each_line): should not use [] reference.

Use `byteslice` instead.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-05-17 13:52:27 +09:00
parent 19e4287d8b
commit ce141b1332
+1 -1
View File
@@ -38,7 +38,7 @@ class String
end
return self if start == self_len
block.call(string[start, self_len - start])
block.call(string.byteslice(start, self_len - start))
self
end