Ruby 4.0 リファレンスマニュアル

instance method TracePoint#inspect

inspect -> StringRuby 2.0.0 から[permalink][rdoc][edit]

self の状態を人間に読みやすい文字列にして返します。

def foo(ret)
  ret
end
trace = TracePoint.new(:call) do |tp|
  p tp.inspect # "#<TracePoint:call 'foo' /path/to/test.rb:1>"
end
trace.enable
foo 1