ruby-changes:38799
From: eregon <ko1@a...>
Date: Sun, 14 Jun 2015 04:42:18 +0900 (JST)
Subject: [ruby-changes:38799] eregon:r50880 (trunk): * test/lib/leakchecker.rb (check): refactor.
eregon 2015-06-14 04:42:03 +0900 (Sun, 14 Jun 2015) New Revision: 50880 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50880 Log: * test/lib/leakchecker.rb (check): refactor. Modified files: trunk/ChangeLog trunk/test/lib/leakchecker.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 50879) +++ ChangeLog (revision 50880) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jun 14 04:40:32 2015 Benoit Daloze <eregontp@g...> + + * test/lib/leakchecker.rb (check): refactor. + Sun Jun 14 04:34:14 2015 Benoit Daloze <eregontp@g...> * test/lib/leakchecker.rb: Return false for no leaks. Index: test/lib/leakchecker.rb =================================================================== --- test/lib/leakchecker.rb (revision 50879) +++ test/lib/leakchecker.rb (revision 50880) @@ -7,11 +7,13 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/test/lib/leakchecker.rb#L7 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/