Preview Ruby 4.1 is a preview. It can change before the final release. 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.
See also
#allow_nan=
#array_nl
#allow_duplicate_key?
#array_nl=
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0