aboutsummaryrefslogtreecommitdiffstats
path: root/test/runner.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 23:13:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-14 23:13:50 +0000
commitdcae4b9d422e0303aa05f988ee7fd12af8adce62 (patch)
tree69c33a192c43a5b3e80e140d647f7c537ead6a51 /test/runner.rb
parent045b6e9fb9b3aee5fe552d70fbd1dd707e852315 (diff)
downloadruby-dcae4b9d422e0303aa05f988ee7fd12af8adce62.tar.gz
runner.rb: use class variable
* test/runner.rb (after_teardown): turn zombie traces hash into a class variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/runner.rb')
-rw-r--r--test/runner.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/runner.rb b/test/runner.rb
index 5a4ef3d6db..9b94fd002c 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -19,15 +19,16 @@ require_relative 'profile_test_all' if ENV.has_key?('RUBY_TEST_ALL_PROFILE')
module Test::Unit
module ZombieHunter
+ @@zombie_traces = Hash.new(0)
+
def after_teardown
super
assert_empty(Process.waitall)
# detect zombie traces.
- zombie_traces = Hash.new(0)
TracePoint.stat.each{|key, (activated, deleted)|
- old, zombie_traces[key] = zombie_traces[key], activated
- assert_equal(old, activated, "The number of active trace events (#{key}) should not increase.")
+ old, @@zombie_traces[key] = @@zombie_traces[key], activated
+ assert_equal(old, activated, "The number of active trace events (#{key}) should not increase")
# puts "TracePoint - deleted: #{deleted}" if deleted > 0
}
end