diff options
Diffstat (limited to 'lib/rubygems/errors.rb')
-rw-r--r-- | lib/rubygems/errors.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/rubygems/errors.rb b/lib/rubygems/errors.rb index e6e222033d..be6c34dc85 100644 --- a/lib/rubygems/errors.rb +++ b/lib/rubygems/errors.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + #-- # This file contains all the various exceptions and other errors that are used # inside of RubyGems. @@ -60,7 +61,7 @@ module Gem def build_message names = specs.map(&:full_name) - "Could not find '#{name}' (#{requirement}) - did find: [#{names.join ','}]\n" + "Could not find '#{name}' (#{requirement}) - did find: [#{names.join ","}]\n" end end @@ -133,11 +134,7 @@ module Gem ## # A wordy description of the error. def wordy - "Found %s (%s), but was for platform%s %s" % - [@name, - @version, - @platforms.size == 1 ? '' : 's', - @platforms.join(' ,')] + format("Found %s (%s), but was for platform%s %s", @name, @version, @platforms.size == 1 ? "" : "s", @platforms.join(" ,")) end end @@ -174,6 +171,6 @@ module Gem ## # The "exception" alias allows you to call raise on a SourceFetchProblem. - alias exception error + alias_method :exception, :error end end |