Project

General

Profile

Actions

Bug #13021

closed

`Zlib.gunzip` modifies argument String

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

Status:
Closed
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 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0