summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-19 14:15:07 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-19 14:15:07 +0000
commitbdacb9344334e5a0169a9cdea983830fe7bbd83a (patch)
tree0a543fc1dc68a709ad6fd4caa9e5674e4fbfc12b /lib
parent35774d2166e5780e062475e28328356a8b42da43 (diff)
downloadruby-bdacb9344334e5a0169a9cdea983830fe7bbd83a.tar.gz
ruby-bdacb9344334e5a0169a9cdea983830fe7bbd83a.tar.xz
ruby-bdacb9344334e5a0169a9cdea983830fe7bbd83a.zip
* lib/tracer.rb (trace_func): save and recover Thread.critical state.
Fixed by Fukumoto Atsushi <fukumoto@imasy.or.jp> [ruby-dev:19830] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/tracer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tracer.rb b/lib/tracer.rb
index f522a9178..3ccf1b501 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -119,6 +119,7 @@ class Tracer
return unless p.call event, file, line, id, binding, klass
end
+ saved_crit = Thread.critical
Thread.critical = true
stdout.printf("#%d:%s:%d:%s:%s: %s",
get_thread_no,
@@ -127,7 +128,7 @@ class Tracer
klass || '',
EVENT_SYMBOL[event],
get_line(file, line))
- Thread.critical = false
+ Thread.critical = saved_crit
end
Single = new