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:
io = StringIO.new \
Zlib::GzipReader.wrap io, external_encoding: Encoding::UTF_8 do |gzio|
This should print "hello"
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.
GH #552: Zlib::GzipWriter.wrap in 1.9 mode accepts only one argument
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).