Skip to content

End of Life Ruby 3.2 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 → hash
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.

Ruby version changes

  1. 3.2