GC.disable → true or false
Disables garbage collection, returning true if garbage collection was already disabled.
GC.disable #=> false GC.disable #=> true
Source Code
/* * call-seq: * GC.disable => true or false * * Disables garbage collection, returning <code>true</code> if garbage * collection was already disabled. * * GC.disable #=> false * GC.disable #=> true * */ VALUE rb_gc_disable() { int old = dont_gc; dont_gc = Qtrue; return old; }
<code/>and<pre/>for code samples.