lib/protocol/http/body/rewindable.rb in protocol-http-0.23.8 vs lib/protocol/http/body/rewindable.rb in protocol-http-0.23.9
- old
+ new
@@ -52,16 +52,16 @@
if @index < @chunks.size
chunk = @chunks[@index]
@index += 1
else
if chunk = super
- @chunks << chunk
+ @chunks << -chunk
@index += 1
end
end
# We dup them on the way out, so that if someone modifies the string, it won't modify the rewindability.
- return chunk&.dup
+ return chunk
end
def rewind
@index = 0
end