Issue #22252 has been updated by getajobmike (Mike Perham). File rtest.rb added Attached is a script with the issue I ran into. `define_method` captures the surrounding context whereas `class_eval` does not. ---------------------------------------- Feature #22252: improve "defined with an un-shareable Proc in a different Ractor" error https://bugs.ruby-lang.org/issues/22252#change-118594 * Author: getajobmike (Mike Perham) * Status: Open ---------------------------------------- Hi, I'm trying to make my Ruby more compatible with Ractors. I'm seeing this error message but in an API with many abstractions, it can be difficult to determine the Proc in question. Would it be possible to include the source_location of the Proc to help improve debugging? ---Files-------------------------------- rtest.rb (350 Bytes) -- https://bugs.ruby-lang.org/