method

readuntil

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: Net::BufferedIO
readuntil(terminator, ignore_eof = false) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/protocol.rb, line 154
    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
Register or log in to add new notes.