Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
JSON::Ext::Generator::State.from_state
from_state(opts)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_from_state_s(VALUE self, VALUE opts)
{
if (rb_obj_is_kind_of(opts, self)) {
return opts;
} else if (rb_obj_is_kind_of(opts, rb_cHash)) {
return rb_funcall(self, i_new, 1, opts);
} else {
return rb_class_new_instance(0, NULL, cState);
}
}