Zlib::GzipWriter.wrap in 1.9 mode accepts only one argument #552

drbrain opened this Issue Feb 27, 2013 · 2 comments


None yet

3 participants

drbrain commented Feb 27, 2013

It seems this was fixed once upon a time in http://jira.codehaus.org/browse/JRUBY-2405 but it seems that change was lost some time over the past five years.

This is related to rubygems/rubygems#472, so jruby users in 1.9 mode can't install gems with RubyGems 2.0.0.

Here is an example to reproduce with:

require 'stringio'
require 'zlib'

io = StringIO.new \

Zlib::GzipReader.wrap io, external_encoding: Encoding::UTF_8 do |gzio|
  puts gzio.read

This should print "hello"

@enebo enebo was assigned Feb 27, 2013


We just need to pass an optional external encoding. It should be straightforward.

http://jira.codehaus.org/browse/JRUBY-2405 changed the method from 2-args to 1-arg, by the way.

enebo commented Feb 28, 2013

Thanks for reporting this Eric. As Hiro said this was both simple and was not a regression of JRUBY-2405 (that was well before 1.9 support was even under way for us).

@enebo enebo closed this Feb 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment