tried this on ruby 2.0.0 / 247 or head:
require 'objspace'
ObjectSpace.trace_object_allocations -> undefined method `trace_object_allocations'
for ObjectSpace:Module
Docs say it should work http://www.ruby-doc.org/stdlib-2.0/libdoc/objspace/rdoc/ObjectSpace.html any idea what I'm missing ?
From the output of
puts ObjectSpace.methods.sortafter requiringobjspace, it looks like that method doesn't exist.You can see that it contains the
::reachable_objects_frommethod, which is mentioned in the docs, but not the one you're looking for, unfortunately.