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:
parent
4a417b08ae
commit
b454b4e310
Notes:
git
2020-05-08 14:14:14 +09:00
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue