method
readuntil
v2_6_3 -
Show latest stable
- Class:
Net::BufferedIO
readuntil(terminator, ignore_eof = false)public
No documentation available.
# File lib/net/protocol.rb, line 188
def readuntil(terminator, ignore_eof = false)
begin
until idx = @rbuf.index(terminator)
rbuf_fill
end
return rbuf_consume(idx + terminator.size)
rescue EOFError
raise unless ignore_eof
return rbuf_consume(@rbuf.size)
end
end