Ruby 2.0 has a similar feature built in, although round the other way: ObjectSpace.reachable_objects_from(obj) .. coupled with ObjectSpace.memsize_of() this can be used to do some memory leak analysis.
We also get GC.stat[:total_allocated_object] and GC.stat[:total_freed_object]
We also get GC.stat[:total_allocated_object] and GC.stat[:total_freed_object]