mirror of
https://github.com/mistergibson/gxg-framework.git
synced 2026-08-15 03:46:00 -07:00
bug fix
This commit is contained in:
parent
132fc22671
commit
11348fec99
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue