ruby / did_you_mean

The gem that has been saving people from typos since 2014
MIT License
1.87k stars 113 forks source link

Suggest keys on NoMatchingPatternKeyError #159

Closed k-tsj closed 3 years ago

k-tsj commented 3 years ago
$ ruby -v -e '{foo: 0} => {fooo:}'
ruby 3.1.0dev (2021-08-15T00:38:24Z master 4568ba0711) [x86_64-linux]
-e:1:in `<main>': {:foo=>0}: key not found: :fooo (NoMatchingPatternKeyError)
Did you mean?  :foo
olleolleolle commented 3 years ago

@k-tsj Would this be green when rebased?

k-tsj commented 3 years ago

Thanks for letting me know. I rebased onto current master.

yuki24 commented 3 years ago

Thank you for all your hard work! I'll take a look at it this weekend.

k-tsj commented 3 years ago

It would be nice if you could merge this PR into ruby/ruby by preview1 release.

Thanks.

yuki24 commented 3 years ago

Thanks!