diff options
author | David RodrÃguez <[email protected]> | 2020-04-05 15:31:10 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-05-08 14:13:29 +0900 |
commit | 5df6082786ac12d5e5dddfa326ca9544cd4913bf () | |
tree | 12581b8ce7bed8d4e1f571c0db4af171c93bf49e | |
parent | b24f7dbcfd605b41e7b510488e30832bd8a1a9ea (diff) |
[rubygems/rubygems] Improve gzip errors logging
By default, the `Zlib::GzipFile::Error` does not include the actual data that was not in gzip format that caused the error. However, its `#inspect` method includes it. I think this can be helpful to troubleshoot errors. https://.com/rubygems/rubygems/commit/11c8717133
Notes: Merged: https://.com/ruby/ruby/pull/3092
-rw-r--r-- | lib/rubygems/util.rb | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -11,7 +11,13 @@ module Gem::Util require 'stringio' data = StringIO.new(data, 'r') - unzipped = Zlib::GzipReader.new(data).read unzipped.force_encoding Encoding::BINARY unzipped end |