From: marcandre-ruby-core@... Date: 2020-12-14T21:35:47+00:00 Subject: [ruby-core:101456] [Ruby master Feature#17393] `Ractor::Moved#inspect` Issue #17393 has been updated by marcandre (Marc-Andre Lafortune). Maybe refining the message from `method_missing` is the best and simplest. (giving info that object was moved, and where). I would also unfreeze the class unless there's a good reason not to. ---------------------------------------- Feature #17393: `Ractor::Moved#inspect` https://bugs.ruby-lang.org/issues/17393#change-89226 * Author: marcandre (Marc-Andre Lafortune) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- It could be helpful to define `Ractor::Moved#inspect` and output the source location of when the data was moved. If preferred, it could raise an error with this information: ``` x = [] Ractor.new{ receive }.send(x, move: true) p x # => "Data was moved in `example.rb:4`" # or p x # => "Data was moved in `example.rb:4`" (Ractor::MovedError) ``` Also @zverok and myself were wondering if there was a technical reason to freeze `Ractor::Moved`? If not, is it only to "force" people to use refinements (which are allowed on frozen classes)? It's already known that it is in general a bad idea to modify builtin classes, so it's not clear to me that freezing that class is best. -- https://bugs.ruby-lang.org/ Unsubscribe: