Closed HosokawaR closed 5 months ago
You see, I'm temped to NOT do anything about this issue in RubyXL
since all that it does is passing the buffer
to RubyZip
; from that point, it's RubyZip
responsebility: if it modifies buffer
, it's it's fault, not RubyXL
s. I do not appreciate this behavior, as there's no reason why it should ever modify the buffer, but that's what they do.
I figured out that when I pass a String
to RubyZip
, then .freeze
'ing it before passing it over does the trick.
I don't have a problem adding a warning about that to the documentation. But I think RubyZip
's issues need to be handled with its developers.
Thank you for your reply.
it's RubyZip responsebility:
I agree. This PR will be closed for now.
Fixes #453 This PR prevent
#parse_buffer
from altering input buffer.As stated in the issue, it is more intuitive for
parse_buffer
to not change the input buffer. However, the internal callZip::File.open_buffer
changes the input buffer if called with block. Therefore, I changed the calling method so that it does not use block.