allocation_sourceline(object) -> Integer
[permalink][rdoc] [added by objspace]
objectの元となったソースファイルの行番号を返します。
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => line:4
ObjectSpace::trace_object_allocations_stop
[SEE_ALSO] ObjectSpace#trace_object_allocations_start, ObjectSpace#trace_object_allocations_stop