From: SASADA Koichi Date: 2012-08-21T11:03:12+09:00 Subject: [ruby-core:47257] Re: [ruby-trunk - Feature #6895] TracePoint API (2012/08/21 6:11), trans (Thomas Sawyer) wrote: > Can we use TracePoint.new to get instance that is not automatically active? eg. > > tracer = TracePoint.new{ |tp| ... } > tracer.trace > > Is same as: > > tc = TracePoint.trace{ |tp| ... } I understand your proposal. I use "Thread.new (Thread.start)" analogy (and current set_trace_func analogy). I think two different behavior is not good. Which one do you like? > Also, I assume that if no events are given as arguments, it includes all events? Yes. >> `eventN' parameter for TracePoint.trace() is set of symbols. You can specify events what you want to trace. If you don't specify any events on it, then all events are activate (similar to set_trace_func). But there is an issue. Now "all" means same events that set_trace_func supports. But if I add other events like "block invoke", then what mean the "all"? -- // SASADA Koichi at atdot dot net