diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-23 21:02:56 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-23 21:02:56 +0900 |
commit | 31a6eaabc165d8a222e176f2c809d90622d88ec2 (patch) | |
tree | b5333db2c13888ede5062ccd8ecca649ea261b4c /lib/rubygems/package.rb | |
parent | f56fc720ee8cd4b79824a1c3843058b662a302bd (diff) |
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
Diffstat (limited to 'lib/rubygems/package.rb')
-rw-r--r-- | lib/rubygems/package.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb index 9b53cd4a7b..9780fc9dce 100644 --- a/lib/rubygems/package.rb +++ b/lib/rubygems/package.rb @@ -47,11 +47,13 @@ require 'rubygems/user_interaction' require 'zlib' class Gem::Package + include Gem::UserInteraction class Error < Gem::Exception; end class FormatError < Error + attr_reader :path def initialize(message, source = nil) @@ -63,13 +65,16 @@ class Gem::Package super message end + end class PathError < Error + def initialize(destination, destination_dir) super "installing into parent path %s of %s is not allowed" % [destination, destination_dir] end + end class NonSeekableIO < Error; end @@ -706,6 +711,7 @@ EOM rescue Zlib::GzipFile::Error => e raise Gem::Package::FormatError.new(e.message, entry.full_name) end + end require 'rubygems/package/digest_io' |