ruby-changes:50837
From: kazu <ko1@a...>
Date: Sat, 31 Mar 2018 11:29:24 +0900 (JST)
Subject: [ruby-changes:50837] kazu:r63044 (trunk): test/lib/leakchecker.rb: Add check_verbose
kazu 2018-03-31 11:29:19 +0900 (Sat, 31 Mar 2018) New Revision: 63044 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63044 Log: test/lib/leakchecker.rb: Add check_verbose Modified files: trunk/test/lib/leakchecker.rb Index: test/lib/leakchecker.rb =================================================================== --- test/lib/leakchecker.rb (revision 63043) +++ test/lib/leakchecker.rb (revision 63044) @@ -6,6 +6,7 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/test/lib/leakchecker.rb#L6 @thread_info = find_threads @env_info = find_env @encoding_info = find_encodings + @old_verbose = $VERBOSE end def check(test_name) @@ -16,6 +17,7 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/test/lib/leakchecker.rb#L17 check_env(test_name), check_encodings(test_name), check_safe(test_name), + check_verbose(test_name), ] GC.start if leaks.any? end @@ -24,6 +26,10 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/test/lib/leakchecker.rb#L26 puts "#{test_name}: $SAFE == #{$SAFE}" unless $SAFE == 0 end + def check_verbose test_name + puts "#{test_name}: $VERBOSE == #{$VERBOSE}" unless @old_verbose == $VERBOSE + end + def find_fds if IO.respond_to?(:console) and (m = IO.method(:console)).arity.nonzero? m[:close] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/