summaryrefslogtreecommitdiff
path: root/lib/tracer.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-16 23:30:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-16 23:30:30 +0000
commit0f0d0dcdb3390fa25f9a34ac38f4d69396093dd7 (patch)
treef2146fa6716cb268bd33b4aa0bb748efdd292364 /lib/tracer.rb
parentdc259038f1cc0f0c764406cd71878f5e1da4068b (diff)
* lib/tracer.rb: count only non-internal libraries in stack trace,
ignoring custom_require. [ruby-core:31858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tracer.rb')
-rw-r--r--lib/tracer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tracer.rb b/lib/tracer.rb
index a0b4fdf..318b254 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -190,6 +190,6 @@ if $0 == __FILE__
ARGV.shift
Tracer.on
require $0
-elsif caller.size <= 1
+elsif caller.count {|bt| /\A<internal:[^<>]+>:/ !~ bt} <= 1
Tracer.on
end