class IO::Stream::Generic
def index_of(pattern, offset, limit)
def index_of(pattern, offset, limit) n't want to split on the pattern, so we subtract the size of the pattern. ffset = pattern.bytesize - 1 ndex = @read_buffer.index(pattern, offset) = @read_buffer.bytesize - split_offset = 0 if offset < 0 nil if limit and offset >= limit nil unless fill_read_buffer index