# File lib/facet/tracepoint.rb, line 65 def trace # :yield: if active bb_stack = [] set_trace_func proc{ |e, f, l, m, b, k| #(p e, f, l, m, b, k, @@bb_stack; puts "---") if $DEBUG if ['call','c-call','class'].include?(e) bb_stack << b elsif ['return','c-return','end'].include?(e) bb = bb_stack.pop end b = bb if ! b # this sucks! tp = TracePoint.new(e,m,b,bb) yield(tp) } end end