summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/tracer.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dba9767c345..7e8222a3138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 17 08:30:27 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/tracer.rb: count only non-internal libraries in stack trace,
+ ignoring custom_require. [ruby-core:31858]
+
Fri Sep 17 02:18:41 2010 Akinori MUSHA <knu@iDaemons.org>
* tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate
diff --git a/lib/tracer.rb b/lib/tracer.rb
index a0b4fdf133d..318b254ac85 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