Created
November 13, 2023 10:57
-
-
Save louishuyng/6a6ecf364f1f1fabb9e170081dd8d274 to your computer and use it in GitHub Desktop.
Track class Stack rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
require 'rubygems' | |
require 'call_stack' | |
require 'pp' | |
class Test | |
def foo | |
bar | |
end | |
def bar | |
pp call_stack(-1) | |
"baz" | |
end | |
end | |
call_stack_on | |
puts Test.new.foo | |
call_stack_off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment