Actions
Bug #17531
closed`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) over 3 years ago
Typo: I meant a class variable, not a class instance variable.
Updated by ko1 (Koichi Sasada) over 3 years ago
- Assignee changed from yuki24 (Yuki Nishijima) to ko1 (Koichi Sasada)
Updated by jeremyevans0 (Jeremy Evans) about 1 year ago
- Status changed from Open to Closed
This was fixed, did_you_mean is now Ractor-friendly: https://github.com/ruby/did_you_mean/commit/8faba54b2d3ec9aa570691775f143801308c5b2f
Actions
Like0
Like0Like0Like0