instance method
Ractor#[]=
[T] (::interned sym, T val) -> T
[]=(sym, val)
ractor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ractor.rb, line 482
def []=(sym, val)
if (self != Ractor.current)
raise RuntimeError, "Cannot set ractor local storage for non-current ractor"
end
Primitive.ractor_local_value_set(sym, val)
end
Sets a value in ractor-local storage for the current Ractor. Obsolete, use Ractor.[]= instead.