From: Rocky Bernstein Date: 2012-08-23T00:54:42+09:00 Subject: [ruby-core:47275] Re: [ruby-trunk - Feature #6895] TracePoint API --20cf306f7d14c323cb04c7dcc255 Content-Type: text/plain; charset=ISO-8859-1 Two things. OO methods (in contrast to global methods from Kernel) are generally the way Ruby does things, right? Second, to reduce confusion and keep compatibility set_trace_func() should be retired. That said, these are small points in the larger issue of having something that makes writing debuggers, profilers and tracers easier and provide more usefulness. So it is those aspects, personally, I care more about than this. On Wed, Aug 22, 2012 at 1:35 AM, SASADA Koichi wrote: > (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 > > Another idea: > > tracer = TracePoint.new(events...){...} > set_trace_func(tracer) # activate > > -- > // SASADA Koichi at atdot dot net > > --20cf306f7d14c323cb04c7dcc255 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Two things. OO methods (in contrast to global methods from Kernel) are gene= rally the way Ruby does things, right?=A0 Second, to reduce confusion and k= eep compatibility set_trace_func() should be retired.

That said, th= ese are small points in the larger issue of having something that makes wri= ting debuggers, profilers and tracers easier and provide more usefulness.= =A0 So it is those aspects, personally, I care more about than this.

On Wed, Aug 22, 2012 at 1:35 AM, SASADA Koic= hi <ko1@atdot.net> wrote:
(2012/08/21 6:11), trans (Thomas Sawyer) wrote:
> Can we use TracePoint.new to get instance that is not autom= atically active? eg.
>
> =A0 tracer =3D TracePoint.new{ |tp| ... }
> =A0 tracer.trace

Another idea:

=A0 tracer =3D TracePoint.new(events...){...}
=A0 set_trace_func(tracer) # activate

--
// SASADA Koichi at atdot dot net


--20cf306f7d14c323cb04c7dcc255--