Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
GC.remove_stress_to_class
GC.remove_stress_to_class(class[, ...])
gc.c
View on GitHub ↗
static VALUE
rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
{
rb_objspace_t *objspace = &rb_objspace;
int i;
if (stress_to_class) {
for (i = 0; i < argc; ++i) {
rb_ary_delete_same(stress_to_class, argv[i]);
}
if (RARRAY_LEN(stress_to_class) == 0) {
set_stress_to_class(0);
}
}
return Qnil;
}
No longer raises NoMemoryError when allocating an instance of the given classes.