[ruby-core:114509] [Ruby master Bug#17531] `did_you_mean` not Ractor friendly

Issue #17531 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed This was fixed, did_you_mean is now Ractor-friendly: https://github.com/ruby/did_you_mean/commit/8faba54b2d3ec9aa570691775f143801... ---------------------------------------- Bug #17531: `did_you_mean` not Ractor friendly https://bugs.ruby-lang.org/issues/17531#change-104300 * Author: marcandre (Marc-Andre Lafortune) * Status: Closed * Priority: Normal * Assignee: ko1 (Koichi Sasada) * ruby -v: 3.0.0p0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- 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) ``` -- https://bugs.ruby-lang.org/
participants (1)
-
jeremyevans0 (Jeremy Evans)