(2012/06/27 21:54), trans (Thomas Sawyer) wrote:
> This should help. I added some YARD docs. See http://rubydoc.info/github/rubyworks/tracepoint/master/frames

Thanks.  I understand the API of TracePoint.

How about to close this ticket and 5528, and re-new ticket about
TracePoint API for Ruby 2.0?


My rough idea:

* Add TracePoint class
  * The class name should be considered.
    * I have no idea about it.
  * ::TracePoint or RubyVM::TracePoint or Thread::TracePoint?

* Add event-separated hooks
  * TracePoint.trace(event_name) { ... } seems good.
  * But how to choose Thread local or system global?
    * Now, we have Kernel#set_trace_func and Thread#set_trace_func
  * One idea is Kernel#trace_point(event_name) and
    Thread#trace_point(event_name)

* Add basic methods (attributes)
  * binding
  * event # event signatures should be symbol, I think.
    * :call, :return
    * :ccall, :creturn
    * :bcall, :breturn # new!
    * :class, :end
    * :raise
    * :line
  * file
  * line
  * klass/id are not in TracePoint.  No need to have?

* I think "call?" or other methods are not needed because
  we can define in Ruby.  Are they indispensable?

-- 
// SASADA Koichi at atdot dot net