method
allocation_class_path
v2_5_5 -
Show latest stable
- Class:
ObjectSpace
allocation_class_path(p1)public
Returns the class for the given object.
class A def foo ObjectSpace::trace_object_allocations do obj = Object.new p "#{ObjectSpace::allocation_class_path(obj)}" end end end A.new.foo #=> "Class"
See ::trace_object_allocations for more information and examples.