From b717f73402dc6f2d6ba6a1d72d9c8543a4f2cd27 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 23 Sep 2020 21:59:35 +0900 Subject: Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636" 31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820 --- lib/rubygems/errors.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/rubygems/errors.rb') 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 -- cgit v1.2.3