aboutsummaryrefslogtreecommitdiffstats
path: root/lib/optparse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index b0284850cf..9745e4d662 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1787,7 +1787,7 @@ XXX
end
all_candidates.select! {|cand| cand.is_a?(String) }
checker = DidYouMean::SpellChecker.new(dictionary: all_candidates)
- DidYouMean.formatter.message_for(checker.correct(opt))
+ DidYouMean.formatter.message_for(all_candidates & checker.correct(opt))
end
def candidate(word)