mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Always pass an encoding option to Zlib::GzipReader.wrap
The arity of this method has been -1 since the import, so the option has been passed always, even if Zlib::GzipReader#initialize does not take the option. Actually it takes the option since 1.9. https://github.com/rubygems/rubygems/commit/2fcde0f4e0
This commit is contained in:
parent
39e8d5e1cd
commit
caa9d0bd78
1 changed files with 1 additions and 5 deletions
|
@ -534,11 +534,7 @@ EOM
|
|||
when 'metadata' then
|
||||
@spec = Gem::Specification.from_yaml entry.read
|
||||
when 'metadata.gz' then
|
||||
opts = {}
|
||||
opts[:external_encoding] = Encoding::UTF_8 if
|
||||
Zlib::GzipReader.method(:wrap).arity != 1
|
||||
|
||||
Zlib::GzipReader.wrap(entry, **opts) do |gzio|
|
||||
Zlib::GzipReader.wrap(entry, external_encoding: Encoding::UTF_8) do |gzio|
|
||||
@spec = Gem::Specification.from_yaml gzio.read
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue