End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Thread#[]=
thr[sym] = obj → obj
thread.c
View on GitHub ↗
static VALUE
rb_thread_aset(VALUE self, VALUE id, VALUE val)
{
return rb_thread_local_aset(self, rb_to_id(id), val);
}
Attribute Assignment—Sets or creates the value of a fiber-local variable, using either a symbol or a string.
See also Thread#[].
For thread-local variables, please see thread_variable_set and thread_variable_get.
See also
#[]
#abort_on_exception
.stop
#abort_on_exception=
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1