Redmine issue: 3660

$B$1$$$8$e!w$$$7$D$+$G$9(B.

ruby-dev$B$K9_$j$^$9(B.

$B$3$NLdBj<+?H$O(Bc-func$B$N%H%l!<%9$r%G%U%)%k%H$G$d$a$?$3$H$K$h$j$^$9(B.
$B$H$$(B
$B$&$3$H$G(B, $B8=;~E@$G$O;EMM$G@N$N?6$kIq$$$KLa$7$?$$$J$i(B,

Tracer::display_c_call = true

$B$7$F$/$@$5$$(B. $B$H$$$&$3$H$K$J$k$H;W$$$^$9(B.

$B$=$l$H(B, $B$b$&$R$H$D5$$,$D$$$?$N$,(B, $B:G?7HG$N(Bruby$B$G$O(B,

ruby -rtracer gg.rb

$B$G%H%l!<%9%a%C%;!<%8$,$G$k$O$:$J$N$K=P$J$/$J$C$F$$$k$3$H$G$9(B.
$B$3$l$O0J(B
$BA0(B, $BF1$8$h$&$JLdBj$,5/$3$C$?$i$7$/(B, $B$=$N;~$O(B,


r29280 | nobu | 2010-09-17 08:30:30 +0900 (Fri, 17 Sep 2010) | 4 lines

  • lib/tracer.rb: count only non-internal libraries in stack trace,
    ignoring custom_require. [ruby-core:31858]

$B$G=$@5$5$l$?$N$G$9$,(B, $B$^$?(B, caller
$B$N=PNO7A<0$,$,JQ$o$C$?$?$a$^$?:FH/(B
$B@8$7$?$?$a$N$h$&$G$9(B.

ruby 1.9.2 p180 $B$G$O0J2<$N$h$&$J7A<0$G(B

[“internal:lib/rubygems/custom_require:29:in require'", "<internal:lib/rubygems/custom_require>:29:in require’”]

$B:G?7HG$G$O0J2<$N$h$&$J7A<0$K$J$C$F$$$^$9(B.

[“/usr/local/apps/rubyware/ruby-1.9.3-20110325/lib/ruby/1.9.1/rubygems/custom_require.rb:42:in
require'", "/usr/local/apps/rubyware/ruby-1.9.3-20110325/lib/ruby/1.9.1/rubygems/custom_require.rb:42:in require’”]

$B$3$l$O(B, $B2<$N:#$N7A<0$,?7$?$J;EMM$K$J$C$?$N$G$7$g$&$+(B?
$B$=$l$H$b(B, caller
$B$N%P%0$G$9$+(B?

$B$5$i$K(B, $B<ALd$G$9$,(B, $B>e5-$G(B,
c-func$B$N%H%l!<%9$r$7$J$$$N$O;EMM$@$H8@$$$^(B
$B$7$?$,(B,
c-func$B$G$b%V%m%C%/$r;}$D%a%=%C%I$O%H%l!<%9$r$7$?$[$&$,$h$$5$$b(B
$B$7$F$$$^$9(B. set_trace_func
$B$G@_Dj$9$k%H%l!<%9MQ$N(Bproc$B$G8F$S=P$5$l$?(B
c-func$B$,%V%m%C%/IU$-$+$I$&$+4JC1$KH=CG$9$k$h$&J|$C$F$"$j$^$9(B?

In the message: “redmine”, on Jun/11 15:07(JST)
SASADA Koichi writes:

Bug #3660: Trace events seem to be missing - Ruby master - Ruby Issue Tracking System
$B$3$A$i!$2?$+$o$+$k$G$7$g$&$+!%%3%a%s%HD:$1$k$H9,$$$G$9!%(B


// SASADA Koichi at atdot dot net

__
---------------------------------------------------->> $B@PDM(B $B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

$B6a1J$H?=$7$^$9!#(B

$B$A$g$&$I(B ruby -rtracer $B$G(B Tracer.on
$B$K$J$i$J$$$N$K5$$,$D$$$FJs9p$7$h$&$H$7$F$$$?$H$3$m$G$7$?!#(B
$BJX>h$5$;$F$$$?$@$-$^$9!#(B

$B$=$l$H(B, $B$b$&$R$H$D5$$,$D$$$?$N$,(B, $B:G?7HG$N(Bruby$B$G$O(B,

ruby -rtracer gg.rb

$B$G%H%l!<%9%a%C%;!<%8$,$G$k$O$:$J$N$K=P$J$/$J$C$F$$$k$3$H$G$9(B.

– snip –

ruby 1.9.2 p180 $B$G$O0J2<$N$h$&$J7A<0$G(B

[“internal:lib/rubygems/custom_require:29:in require'", "<internal:lib/rubygems/custom_require>:29:inrequire’”]

$B:G?7HG$G$O0J2<$N$h$&$J7A<0$K$J$C$F$$$^$9(B.

["/usr/local/apps/rubyware/ruby-1.9.3-20110325/lib/ruby/1.9.1/rubygems/custom_require.rb:42:in
require'", "/usr/local/apps/rubyware/ruby-1.9.3-20110325/lib/ruby/1.9.1/rubygems/custom_require.rb:42:inrequire’"]

$B$*$=$i$/(B r30538 $B$G(B gem_prelude
$B$,GQ;_$5$l$?$"$?$j$+$i$NJQ2=$@$H;W$$$^$9!#(B
test_tracer.rb $B$N%F%9%H$K$b$3$N;~(B --disable-gem
$B$,DI2C$5$l$F$$$?$?$a<WJC$5$l$F$$$?$h$&$G$9!#(B

$B$=$3$G!"$H$j$"$($:(B caller $B$+$i=|30$9$k>r7o$r(B internal:...
$B$+$i(B rubygems/custom_require.rb: $B$r(B
$B4^$`$HJQ99$9$k$HD>$k$N$G$9$,!"$$$+$K$b>lEv$?$jE*$G$$$:$l$^$?2u$7$F$7$^$$$=$&$G$9!#(B
-r $B%*%W%7%g%s7PM3$G<B9T$5$l$F$$$k$3$H$r(B Ruby
$B%9%/%j%W%H$+$iCN$kJ}K!$O2?$+$J$$$b$N$G$7$g$&$+!#(B