Commit 0810214d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix NoMethodError in ChunkedIO class

parent 7e2ff88b
...@@ -75,7 +75,7 @@ module Gitlab ...@@ -75,7 +75,7 @@ module Gitlab
until length <= 0 || eof? until length <= 0 || eof?
data = chunk_slice_from_offset data = chunk_slice_from_offset
raise FailedToGetChunkError if data.empty? raise FailedToGetChunkError if data.to_s.empty?
chunk_bytes = [CHUNK_SIZE - chunk_offset, length].min chunk_bytes = [CHUNK_SIZE - chunk_offset, length].min
chunk_data_slice = data.byteslice(0, chunk_bytes) chunk_data_slice = data.byteslice(0, chunk_bytes)
...@@ -100,7 +100,7 @@ module Gitlab ...@@ -100,7 +100,7 @@ module Gitlab
until eof? until eof?
data = chunk_slice_from_offset data = chunk_slice_from_offset
raise FailedToGetChunkError if data.empty? raise FailedToGetChunkError if data.to_s.empty?
new_line = data.index("\n") new_line = data.index("\n")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment