def gets(sep_string, length = nil)
      return read(length) if sep_string.nil?

      # Read more data until we get the sep_string
      while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof?
        break if length && @read_buffer.length >= length

        read_block
      end
      index ||= -1
      data    = @read_buffer.slice!(0..index)
      @pos   += data.length
      return nil if data.empty? && eof?

      data
    end
def gets(sep_string, length = nil)
      return read(length) if sep_string.nil?

      # Read more data until we get the sep_string
      while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof?
        break if length && @read_buffer.length >= length

        read_block
      end
      index ||= -1
      data    = @read_buffer.slice!(0..index)
      @pos   += data.length
      return nil if data.empty? && eof?

      data
    end
Reads a single decrypted line from the file up to and including the optional sep_string.
 A sep_string of nil reads the entire contents of the file
 Returns nil on eof
 The stream must be opened for reading or an IOError will be raised.