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 de8e802 commit dcd1d25Copy full SHA for dcd1d25
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
@@ -78,7 +78,7 @@ def test_find_command_unknown_suggestions
78
79
message = "Unknown command pish".dup
80
81
- if defined?(DidYouMean)
+ if e.respond_to?(:corrections)
82
message << "\nDid you mean? \"push\""
83
84
0 commit comments