rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.11k stars 552 forks source link

Getting "DidYouMean::SPELL_CHECKERS.merge!" warning with Ruby 3.1 #763

Closed jasnow closed 2 years ago

jasnow commented 2 years ago

It appears that some repos using thor gem with Ruby 3.1 have this warning message when running "rake" command:

DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. 
Please call DidYouMean.correct_error(error_name, spell_checker) instead.

Find SHELL_CHECKERS string is this file (line 105): thor-1.1.0/lib/thor/error.rb

Sample (Rails 6.1/Ruby 3.1) App: https://github.com/jasnow/rt_demo_app

andrehjr commented 2 years ago

Should be fixed by https://github.com/rails/thor/pull/761

jasnow commented 2 years ago

Duplicate so closing