Actions
Bug #4360
closedZlib::GzipReader#unused raises "called on hidden object" error when called
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-02-01 trunk 30751) [x86_64-darwin10.6.0]
Backport:
Description
=begin
When reading concatenated gzip streams #unused is provided for accessing the data that has been read from the IO but not consumed by libz. Unfortunately calling this method raises an exception:
$ ruby19 -v t.rb
ruby 1.9.3dev (2011-02-01 trunk 30751) [x86_64-darwin10.6.0]
aaaa
t.rb:21:in <main>': method
method_missing' called on hidden T_STRING object (0x0000010090ee20 flags=0x6105 klass=0x0) (NotImplementedError)
Zlib::GzipReader#unused returns the internal buffer directly but dups it. Copying the input string's contents duplicates fixes the problem. A stupid patch is attached.
This occurs on 1.8.7, 1.9.1 and 1.9.2 as well.
=end
Files
Actions
Like0
Like0Like0