End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#allow_nan?
allow_nan?
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_allow_nan_p(VALUE self)
{
GET_STATE(self);
return state->allow_nan ? Qtrue : Qfalse;
}
Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise returns false.