Project

General

Profile

Actions

Bug #17531

closed

`did_you_mean` not Ractor friendly

Added by marcandre (Marc-Andre Lafortune) over 3 years ago. Updated 8 months ago.

Status:
Closed
Target version:
-
[ruby-core:102037]

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)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0