Return the current execution stack in ruby
You can see the current execution stack with the caller method in ruby. It will show you where the currently executing method is called.
def my_method
call_me
end
def call_me
puts caller
end
my_method
#=>
#_:2:in `foo'
#_:7:in `<main>'
Tweet