Flowdock
method

allocation_class_path

Importance_1
v2_5_5 - Show latest stable - 0 notes - 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.

Show source
Register or log in to add new notes.