Bug #17531
`did_you_mean` not Ractor friendly
Description
The gem did_you_mean
uses a class instance variable that does not work with Ractor.
$ RUBYOPT='--disable-did_you_mean' ruby -W0 -e 'Ractor.new{ begin ; nil + 42; rescue Exception => e; e.to_s end}.take' # => prints nothing (ok) $ ruby -W0 -e 'Ractor.new{ begin ; nil + 42; rescue Exception => e; e.to_s end}.take' # Prints /Users/mal/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean.rb:102:in `formatter' /Users/mal/.rbenv/versions/3.0.0/lib/ruby/3.0.0/did_you_mean/core_ext/name_error.rb:9:in `to_s' -e:1:in `rescue in block in <main>' -e:1:in `block in <main>' # (not ok)
Updated by marcandre (Marc-Andre Lafortune) about 2 months ago
Typo: I meant a class variable, not a class instance variable.
Updated by ko1 (Koichi Sasada) about 1 month ago
- Assignee changed from yuki24 (Yuki Nishijima) to ko1 (Koichi Sasada)