lib/stringio.rb in rubysl-stringio-2.2 vs lib/stringio.rb in rubysl-stringio-2.3

- old
+ new

@@ -694,20 +694,21 @@ return nil if eof? d = @__data__ pos = d.pos string = d.string + m = Rubinius::Mirror.reflect string if sep.nil? if limit line = string.byteslice(pos, limit) else line = string.byteslice(pos, string.bytesize - pos) end d.pos += line.bytesize elsif sep.empty? - if stop = string.find_string("\n\n", pos) + if stop = m.find_string("\n\n", pos) stop += 2 line = string.byteslice(pos, stop - pos) while string.getbyte(stop) == 10 stop += 1 end @@ -715,10 +716,10 @@ else line = string.byteslice(pos, string.bytesize - pos) d.pos = string.bytesize end else - if stop = string.find_string(sep, pos) + if stop = m.find_string(sep, pos) if limit && stop - pos >= limit stop = pos + limit else stop += sep.bytesize end