mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
string.rb (each_line): may truncate string by mistake; fix #5727
This commit is contained in:
+2
-2
@@ -27,8 +27,8 @@ class String
|
||||
end
|
||||
start = 0
|
||||
string = dup
|
||||
self_len = length
|
||||
sep_len = separator.length
|
||||
self_len = self.bytesize
|
||||
sep_len = separator.bytesize
|
||||
|
||||
while (pointer = string.byteindex(separator, start))
|
||||
pointer += sep_len
|
||||
|
||||
Reference in New Issue
Block a user