mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
string.rb (each_line): should not use [] reference.
Use `byteslice` instead.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user