lib/bindata/io.rb in bindata-2.4.8 vs lib/bindata/io.rb in bindata-2.4.9
- old
+ new
@@ -167,24 +167,24 @@
def read_raw_with_readahead(n)
data = ""
unless @read_data.empty? || @in_readahead
bytes_to_consume = [n, @read_data.length].min
- data << @read_data.slice!(0, bytes_to_consume)
+ data += @read_data.slice!(0, bytes_to_consume)
n -= bytes_to_consume
if @read_data.empty?
class << self
alias_method :read_raw, :read_raw_without_readahead
end
end
end
raw_data = @raw_io.read(n)
- data << raw_data if raw_data
+ data += raw_data if raw_data
if @in_readahead
- @read_data << data
+ @read_data += data
end
@offset += data.size
data