summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 02:43:31 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 02:43:31 +0000
commit895bb667b294ab2b762c83373c320a5bbf94dd3f (patch)
tree036c21c577facaec97058533eda6d5a25b94485f /test
parent1692d4933845fad2f35fd949e9473688029da00b (diff)
* test/ruby/test_settracefunc.rb: disable trace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_settracefunc.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index e4db9adb82..3becc14c41 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -416,6 +416,8 @@ class TestSetTraceFunc < Test::Unit::TestCase
end
}
+ trace = nil
+ begin
eval <<-EOF.gsub(/^.*?: /, ""), nil, 'xyzzy'
1: trace = TracePoint.trace(*trace_events){|tp|
2: events << [tp.event, tp.lineno, tp.path, tp.defined_class, tp.method_id, tp.self, tp.binding.eval("local_var"), get_data.(tp)]
@@ -440,6 +442,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
21: trace.disable
EOF
self.class.class_eval{remove_const(:XYZZY)}
+ ensure
+ trace.disable if trace && trace.enabled?
+ end
answer_events = [
#