1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Make MissingSpecError accept an extra error message

https://github.com/rubygems/rubygems/commit/b23d2421df
This commit is contained in:
bronzdoc 2020-04-26 11:54:32 -06:00 committed by Hiroshi SHIBATA
parent 4a417b08ae
commit b454b4e310
Notes: git 2020-05-08 14:14:14 +09:00

View file

@ -28,14 +28,15 @@ module Gem
# 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