* test/ruby/test_settracefunc.rb: disable trace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2012-12-05 02:43:31 +00:00
parent 1692d49338
commit 895bb667b2
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Wed Dec 5 11:42:38 2012 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_settracefunc.rb: disable trace.
Wed Dec 5 11:37:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Dec 5 11:37:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (MakeMakefile#macro_defined?): use clearly different * lib/mkmf.rb (MakeMakefile#macro_defined?): use clearly different

View File

@ -416,6 +416,8 @@ class TestSetTraceFunc < Test::Unit::TestCase
end end
} }
trace = nil
begin
eval <<-EOF.gsub(/^.*?: /, ""), nil, 'xyzzy' eval <<-EOF.gsub(/^.*?: /, ""), nil, 'xyzzy'
1: trace = TracePoint.trace(*trace_events){|tp| 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)] 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 21: trace.disable
EOF EOF
self.class.class_eval{remove_const(:XYZZY)} self.class.class_eval{remove_const(:XYZZY)}
ensure
trace.disable if trace && trace.enabled?
end
answer_events = [ answer_events = [
# #