This commit is contained in:
G. Gibson 2023-04-02 06:32:45 -07:00
parent 132fc22671
commit 11348fec99

View file

@ -651,16 +651,16 @@ class IO
GxG::apportioned_ranges(current_size, segment_size).each do |portion_range| GxG::apportioned_ranges(current_size, segment_size).each do |portion_range|
self.seek(portion_range.first) self.seek(portion_range.first)
if as_bytearrays if as_bytearrays
block.call(bytes self.read(portion_range.size)) block.call(::GxG::ByteArray.new(self.read(portion_range.size)))
else else
block.call(self.read(portion_range.size)) block.call(self.ead(portion_range.size))
end end
end end
else else
GxG::apportioned_ranges(current_size, segment_size).each do |portion_range| GxG::apportioned_ranges(current_size, segment_size).each do |portion_range|
self.seek(portion_range.first) self.seek(portion_range.first)
if as_bytearrays if as_bytearrays
result << bytes self.read(portion_range.size) result << ::GxG::ByteArray.new(self.read(portion_range.size))
else else
result << self.read(portion_range.size) result << self.read(portion_range.size)
end end