Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#buffer_initial_length=
buffer_initial_length=(length)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_buffer_initial_length_set(VALUE self, VALUE buffer_initial_length)
{
long initial_length;
GET_STATE(self);
Check_Type(buffer_initial_length, T_FIXNUM);
initial_length = FIX2LONG(buffer_initial_length);
if (initial_length > 0) {
state->buffer_initial_length = initial_length;
}
return Qnil;
}
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn’t changed.
See also
#buffer_initial_length
#check_circular?
#ascii_only?
#configure
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0