diff options
author | David RodrÃguez <[email protected]> | 2024-09-26 15:53:39 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-10-02 14:34:55 +0900 |
commit | 49483904d8fcac3bd5ef9e897279563235583f4a () | |
tree | f4be4b9f4ce27d1f3a719afef76b6544f80e4c19 /lib/rubygems/errors.rb | |
parent | 02d50d9cb17e8daccf788347593e97cae354ba4e (diff) |
[rubygems/rubygems] Make sure MissingSpecVersionError#to_s prints exception message
Gem command loading errors rely on `#to_s` on the raised exception, but in the case of `MissingSpecVersionError` that was only the exception name, making it printed twice and no message at all. Before: ``` ERROR: Loading command: install (Gem::MissingSpecVersionError) Gem::MissingSpecVersionError ``` After: ``` ERROR: Loading command: install (Gem::MissingSpecVersionError) Could not find 'io-wait' (>= 0.a) - did find: [io-wait-0.3.0-java] Checked in 'GEM_PATH=/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1.1/gems/system' , execute `gem env` for more information ``` https://.com/rubygems/rubygems/commit/d06944bb2f
-rw-r--r-- | lib/rubygems/errors.rb | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -30,6 +30,7 @@ module Gem @name = name @requirement = requirement @extra_message = extra_message end def message # :nodoc: @@ -53,8 +54,8 @@ module Gem attr_reader :specs def initialize(name, requirement, specs) - super(name, requirement) @specs = specs end private |