-
-
Save k-tsj/7be6c6d67fb5be28f777735e8879cd50 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ ruby t.rb | |
["t.rb:1:in `m1'", "t.rb:7:in `<main>'"] | |
["t.rb:2:in `m2'", "t.rb:8:in `<main>'"] | |
["t.rb:9:in `<main>'"] | |
["t.rb:4:in `block in <main>'", "t.rb:10:in `<main>'"] |
This file contains hidden or 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
def m1; end | |
def m2; raise ''; end | |
define_method(:bm1) {} | |
define_method(:bm2) { raise '' } | |
TracePoint.trace(:return) { p caller_locations } | |
m1 | |
m2 rescue nil | |
bm1 | |
bm2 rescue nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment