Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
GC::Profiler.enabled?
() -> bool
GC::Profiler.enabled? → true or false
gc/default/default.c
View on GitHub ↗
static VALUE
gc_profile_enable_get(VALUE self)
{
rb_objspace_t *objspace = rb_gc_get_objspace();
return objspace->profile.run ? Qtrue : Qfalse;
}
The current status of GC profile mode.