Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
JSON::Ext::Generator::State.rfc8785_number_formatter_proc=
rfc8785_number_formatter_proc=(p1)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_set_rfc8785_number_formatter_proc(VALUE self, VALUE proc)
{
if (!rb_obj_is_proc(proc)) {
rb_raise(rb_eTypeError, "rfc8785_number_formatter_proc must be a Proc");
}
if (rfc8785_number_formatter_proc) {
rb_raise(rb_eArgError, "rfc8785_number_formatter_proc can only be set once");
}
return rfc8785_number_formatter_proc = proc;
}
No documentation available