We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c5ddb7 commit ac24f70Copy full SHA for ac24f70
lib/rubygems/exceptions.rb
@@ -21,13 +21,11 @@ def initialize(unknown_command)
21
end
22
23
def self.attach_correctable
24
- return if defined?(@attached)
+ return if method_defined?(:corrections)
25
26
if defined?(DidYouMean) && DidYouMean.respond_to?(:correct_error)
27
DidYouMean.correct_error(Gem::UnknownCommandError, Gem::UnknownCommandSpellChecker)
28
29
-
30
- @attached = true
31
32
33
test/rubygems/test_gem_command_manager.rb
@@ -79,7 +79,7 @@ def test_find_command_unknown_suggestions
79
80
message = "Unknown command pish".dup
81
82
- if defined?(DidYouMean)
+ if e.respond_to?(:corrections)
83
message << "\nDid you mean? \"push\""
84
85
0 commit comments