Method: GC.enable

Defined in:
gc.c

.enableBoolean

Enables garbage collection, returning true if garbage collection was previously disabled.

GC.disable   #=> false
GC.enable    #=> true
GC.enable    #=> false

Returns:



6839
6840
6841
6842
6843
6844
6845
6846
6847
# File 'gc.c', line 6839

VALUE
rb_gc_enable(void)
{
    rb_objspace_t *objspace = &rb_objspace;
    int old = dont_gc;

    dont_gc = FALSE;
    return old ? Qtrue : Qfalse;
}