Sometimes it’s useful to know the stack trace at a certain point in your Ruby code without using the debugger (or throwing an exception). Here’s one way to do it:
puts Kernel.caller.join("\n")
Sometimes it’s useful to know the stack trace at a certain point in your Ruby code without using the debugger (or throwing an exception). Here’s one way to do it:
puts Kernel.caller.join("\n")