Project

General

Profile

Actions

Bug #17531

closed

`did_you_mean` not Ractor friendly

Added by marcandre (Marc-Andre Lafortune) about 3 years ago. Updated 7 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)

Updated by marcandre (Marc-Andre Lafortune) about 3 years ago

Typo: I meant a class variable, not a class instance variable.

Updated by ko1 (Koichi Sasada) about 3 years ago

  • Assignee changed from yuki24 (Yuki Nishijima) to ko1 (Koichi Sasada)

Updated by jeremyevans0 (Jeremy Evans) 7 months ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0