Issue #13021 has been reported by Kazuhiro NISHIYAMA.

----------------------------------------
Bug #13021: `Zlib.gunzip` modifies argument String
https://bugs.ruby-lang.org/issues/13021

* Author: Kazuhiro NISHIYAMA
* Status: Open
* Priority: Normal
* Assignee: Yui NARUSE
* ruby -v: ruby 2.4.0dev (2016-12-10 trunk 57036) [x86_64-linux]
* Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED
----------------------------------------
```
% irb -r irb/completion --simple-prompt
>> RUBY_DESCRIPTION
=> "ruby 2.4.0dev (2016-12-10 trunk 57036) [x86_64-linux]"
>> require 'zlib'
=> true
>> gz=Zlib.gzip('test')
=> "\x1F\x8B\b\x00\xBF`KX\x00\x03+I-.\x01\x00\f~\x7F\xD8\x04\x00\x00\x00"
>> Zlib.gunzip(gz)
=> "test"
>> gz
=> "+I-.\x01\x00\f~\x7F\xD8\x04\x00\x00\x00"
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>