End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
GC.enable
GC.enable → true or false
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/gc.rb, line 51
def self.enable
Primitive.gc_enable
end
Enables garbage collection, returning true if garbage collection was previously disabled.
Example
GC.disable #=> false GC.enable #=> true GC.enable #=> false
See also
.disable
.latest_compact_info
.count
.latest_gc_info
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0