diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-10-18 15:15:59 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-10-18 15:18:36 +0900 |
commit | 46fa301e82d50161fc7ec8e455d9d498b15b2c7a () | |
tree | a05e57d865b3c255a4b9022644e8445e2516530e /lib/optparse.rb | |
parent | e50b8949fad96a30226e4122172822a2a4c7301d (diff) |
Use DidYouMean.formatter
Instead of building messages separately.
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1777,7 +1777,7 @@ XXX end all_candidates.select! {|cand| cand.is_a?(String) } suggestions = DidYouMean::SpellChecker.new(dictionary: all_candidates).correct(opt) - raise InvalidOption.new(opt, "\nDid you mean? #{suggestions.join("\n ")}") else raise InvalidOption, opt end |