ruby-changes:61115
From: bronzdoc <ko1@a...>
Date: Fri, 8 May 2020 14:14:37 +0900 (JST)
Subject: [ruby-changes:61115] b454b4e310 (master): [rubygems/rubygems] Make MissingSpecError accept an extra error message
https://git.ruby-lang.org/ruby.git/commit/?id=b454b4e310 From b454b4e3107921348bc13f8c024239f82965ed4a Mon Sep 17 00:00:00 2001 From: bronzdoc <lsagastume1990@g...> Date: Sun, 26 Apr 2020 11:54:32 -0600 Subject: [rubygems/rubygems] Make MissingSpecError accept an extra error message https://github.com/rubygems/rubygems/commit/b23d2421df diff --git a/lib/rubygems/errors.rb b/lib/rubygems/errors.rb index 2cd18e2..362a078 100644 --- a/lib/rubygems/errors.rb +++ b/lib/rubygems/errors.rb @@ -28,14 +28,15 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems/errors.rb#L28 # superclass Gem::LoadError to catch all types of load errors. class MissingSpecError < Gem::LoadError - def initialize(name, requirement) + def initialize(name, requirement, extra_message=nil) @name = name @requirement = requirement + @extra_message = extra_message end def message # :nodoc: build_message + - "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}', execute `gem env` for more information" + "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information" end private -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/