# File lib/memcache/event_machine.rb, line 109
    def gets
      while true
        # Read to ensure we have some data in the buffer
        line = read(2)
        # Reset the buffer index to zero
        @buf = @buf.slice(@index..-1)
        @index = 0
        if eol = @buf.index(SEP)
          line << yank(eol + SEP.size)
          break
        else
          # EOL not in the current buffer
          line << yank(@buf.size)
        end
      end
      line
    end