Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created November 29, 2012 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/4166719 to your computer and use it in GitHub Desktop.
Save tenderlove/4166719 to your computer and use it in GitHub Desktop.
class Foo
def bar; raise; end
def baz
bar
rescue
end
end
tp = TracePoint.new("call", "return") do |trace|
p [trace.klass, trace.id, trace.event, trace.lineno]
end
tp.enable
Foo.new.baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment