Project

General

Profile

Bug #13021

`Zlib.gunzip` modifies argument String

Added by znz (Kazuhiro NISHIYAMA) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-12-10 trunk 57036) [x86_64-linux]
[ruby-core:78567]

Description

% 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"

Related issues

Related to Ruby master - Feature #13020: Zlib.gzip and Zlib.gunzipClosedActions

Also available in: Atom PDF