tracing ruby method calls

Developer from somewhere

The following allowed me to identify the cause of an infinite loop:

tp = TracePoint.new(:call) do |x|
  puts x.inspect
end
tp.enable
# add your own code here
tp.disable

When running this, you’ll see all method calls in between enable/disable of the tracepoint