summaryrefslogtreecommitdiff
path: root/lib/rubygems/errors.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-23 21:59:35 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-23 22:01:44 +0900
commitb717f73402dc6f2d6ba6a1d72d9c8543a4f2cd27 (patch)
tree9d4a4c198aa124592552c66e2a3e6d130b6486eb /lib/rubygems/errors.rb
parenta46841612c846f00f31ff63d886620d66cdea5b3 (diff)
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
Diffstat (limited to 'lib/rubygems/errors.rb')
-rw-r--r--lib/rubygems/errors.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/rubygems/errors.rb b/lib/rubygems/errors.rb
index 362a07865f..abee20651e 100644
--- a/lib/rubygems/errors.rb
+++ b/lib/rubygems/errors.rb
@@ -13,13 +13,11 @@ module Gem
# already activated gems or that RubyGems is otherwise unable to activate.
class LoadError < ::LoadError
-
# Name of gem
attr_accessor :name
# Version requirement of gem
attr_accessor :requirement
-
end
##
@@ -27,7 +25,6 @@ module Gem
# system. Instead of rescuing from this class, make sure to rescue from the
# superclass Gem::LoadError to catch all types of load errors.
class MissingSpecError < Gem::LoadError
-
def initialize(name, requirement, extra_message=nil)
@name = name
@requirement = requirement
@@ -45,7 +42,6 @@ module Gem
total = Gem::Specification.stubs.size
"Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n"
end
-
end
##
@@ -53,7 +49,6 @@ module Gem
# not the requested version. Instead of rescuing from this class, make sure to
# rescue from the superclass Gem::LoadError to catch all types of load errors.
class MissingSpecVersionError < MissingSpecError
-
attr_reader :specs
def initialize(name, requirement, specs)
@@ -70,13 +65,11 @@ module Gem
names = specs.map(&:full_name)
"Could not find '#{name}' (#{requirement}) - did find: [#{names.join ','}]\n"
end
-
end
# Raised when there are conflicting gem specs loaded
class ConflictError < LoadError
-
##
# A Hash mapping conflicting specifications to the dependencies that
# caused the conflict
@@ -101,7 +94,6 @@ module Gem
super("Unable to activate #{target.full_name}, because #{reason}")
end
-
end
class ErrorReason; end
@@ -113,7 +105,6 @@ module Gem
# in figuring out why a gem couldn't be installed.
#
class PlatformMismatch < ErrorReason
-
##
# the name of the gem
attr_reader :name
@@ -151,7 +142,6 @@ module Gem
@platforms.size == 1 ? '' : 's',
@platforms.join(' ,')]
end
-
end
##
@@ -159,7 +149,6 @@ module Gem
# data from a source
class SourceFetchProblem < ErrorReason
-
##
# Creates a new SourceFetchProblem for the given +source+ and +error+.
@@ -190,6 +179,5 @@ module Gem
# The "exception" alias allows you to call raise on a SourceFetchProblem.
alias exception error
-
end
end