Actions
Bug #22105
openCannot initialize a WeakRef in a Ractor
Bug #22105:
Cannot initialize a WeakRef in a Ractor
Description
Hey hey!
If I try to create a WeakRef in a Ractor, like in this script:
require "weakref"
Ractor.new { WeakRef.new("asdf") }.join
Then I get this error:
4.1-dev/lib/ruby/4.1.0+3/weakref.rb:40:in 'WeakRef#initialize': can not read non-shareable class variable @@__map from non-main Ractors (WeakRef) (Ractor::IsolationError)
This happens in both a local build of 4.1-dev and 4.0.5 and likely other versions.
Updated by jhawthorn (John Hawthorn) 3 days ago
- Assignee set to ractor
Actions