End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#[]
[](name)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_aref(VALUE self, VALUE name)
{
name = rb_funcall(name, i_to_s, 0);
if (RTEST(rb_funcall(self, i_respond_to_p, 1, name))) {
return rb_funcall(self, i_send, 1, name);
} else {
return rb_attr_get(self, rb_intern_str(rb_str_concat(rb_str_new2("@"), name)));
}
}
Returns the value returned by method name.