From: "getajobmike (Mike Perham) via ruby-core" Date: 2026-08-19T18:31:25+00:00 Subject: [ruby-core:126446] [Ruby Feature#22252] improve "defined with an un-shareable Proc in a different Ractor" error Issue #22252 has been updated by getajobmike (Mike Perham). Thanks for the tip. I think that points out a pretty big flaw in Ractors today -- they are incompatible with idiomatic Ruby where we pass blocks around freely. Annotating every block like this is a big scar on Ruby's elegant syntax. I wonder if a new syntax shortcut would be reasonable, for example `-|>` instead of `&` to indicate an isolate, a proc which should not capture its surroundings. I presume this has already been discussed but that's the direction I would consider. ---------------------------------------- Feature #22252: improve "defined with an un-shareable Proc in a different Ractor" error https://bugs.ruby-lang.org/issues/22252#change-118596 * 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/