End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
GC.disable
GC.disable → true or false
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/gc.rb, line 84
def self.disable
Primitive.gc_disable
end
Disables garbage collection, returning true if garbage collection was already disabled.
Example
GC.disable #=> false GC.disable #=> true