aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/leakchecker.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 19:42:03 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 19:42:03 +0000
commitb1e064fc059436691fc16c6096087bb8b6b719c8 (patch)
tree476031e9739621e8db5f6fd78ae7f0e56118c7f8 /test/lib/leakchecker.rb
parentc4dba39028e1ab0cde9fe985ed8733617e697431 (diff)
downloadruby-b1e064fc059436691fc16c6096087bb8b6b719c8.tar.gz
* test/lib/leakchecker.rb (check): refactor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/leakchecker.rb')
-rw-r--r--test/lib/leakchecker.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/lib/leakchecker.rb b/test/lib/leakchecker.rb
index 74244b33dc..fbdff2d2a3 100644
--- a/test/lib/leakchecker.rb
+++ b/test/lib/leakchecker.rb
@@ -7,11 +7,13 @@ class LeakChecker
end
def check(test_name)
- leaked1 = check_fd_leak(test_name)
- leaked2 = check_thread_leak(test_name)
- leaked3 = check_tempfile_leak(test_name)
- leaked4 = check_env(test_name)
- GC.start if leaked1 || leaked2 || leaked3 || leaked4
+ leaks = [
+ check_fd_leak(test_name),
+ check_thread_leak(test_name),
+ check_tempfile_leak(test_name),
+ check_env(test_name)
+ ]
+ GC.start if leaks.any?
end
def find_fds