From: SASADA Koichi Date: 2012-11-26T05:47:42+09:00 Subject: [ruby-core:50089] Re: [ruby-trunk - Feature #6895] TracePoint API Hi, (2012/11/26 4:27), trans (Thomas Sawyer) wrote: > I made a comparison of the API with the pure Ruby TracePoint gem I had written and have a few points: I don't copy TracePoint gem. > * Do all traces have a defined event type now? I see that I had #event? and #eventless? methods in my API b/c sometimes event is nil, I think. I can't get points. What is "defined event"? > * Is there a way to get the callee, i.e. the current method name (if any)? caller or caller_locations is not enough? > * I had defined #=== so one could use case statements matching against event types. Might be handy. case tp.event when :call, :c_call ... end is not enough? > * Is #klass method necessary since one can call `self.class`? But maybe `self.class` is much less efficient? Also, "klass" is an ugly name. Would be nice if there were a better alias, but I can't think of a good name. I agree with - it is ugly - but no good name . > * Lastly, is there a way to get prior binding(s)? It's been a long time, but when I first worked on this I recall a need to get access to the previous binding. Unfortunately I can't recall why now, but I remember it being a significant enough problem that I made sure to add support for it. No. It is too powerful. It should be discuss at another place. -- // SASADA Koichi at atdot dot net