End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#array_nl=
array_nl=(array_nl)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_array_nl_set(VALUE self, VALUE array_nl)
{
unsigned long len;
GET_STATE(self);
Check_Type(array_nl, T_STRING);
len = RSTRING_LEN(array_nl);
if (len == 0) {
if (state->array_nl) {
ruby_xfree(state->array_nl);
state->array_nl = NULL;
}
} else {
if (state->array_nl) ruby_xfree(state->array_nl);
state->array_nl = fstrndup(RSTRING_PTR(array_nl), len);
state->array_nl_len = len;
}
return Qnil;
}
This string is put at the end of a line that holds a JSON array.
See also
#array_nl
#ascii_only?
#allow_nan?
#buffer_initial_length
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0