Created
August 22, 2014 21:24
-
-
Save jroesch/7cf3c1b045fe424655c4 to your computer and use it in GitHub Desktop.
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
trace = TracePoint.new(:call, :b_call, :c_call) do |tp| | |
p [tp.lineno, tp.defined_class, tp.method_id, tp.event] | |
end | |
trace.enable | |
puts "Hello, TracePoint!" | |
puts [1,2,3].length | |
[7, Kernel, :puts, :c_call] | |
[7, IO, :puts, :c_call] | |
[7, IO, :write, :c_call] | |
Hello, TracePoint![7, IO, :write, :c_call] | |
[9, Kernel, :puts, :c_call] | |
[9, IO, :puts, :c_call] | |
[9, Fixnum, :to_s, :c_call] | |
[9, IO, :write, :c_call] | |
3[9, IO, :write, :c_call] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment