Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
GC.disable
GC.disable → true or false
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/gc.rb, line 69
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