Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

GC.latest_gc_info

GC.latest_gc_info → {:gc_by=>:newobj}
GC.latest_gc_info(hash) → hash
GC.latest_gc_info(:major_by) → :malloc
Returns information about the most recent garbage collection.

If the optional argument, hash, is given, it is overwritten and returned. This is intended to avoid probe effect.