summaryrefslogtreecommitdiff
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-01 22:31:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-01 22:31:30 +0000
commitfe38158f9bfe14b7e4b28f5e3e05f371dee429d8 (patch)
tree8570bba2c9c88bc8191999885f3967cf30b26c61 /test/ruby/envutil.rb
parent046831094b355d8d293d22a3ad5be5332307c96c (diff)
* test/ruby/envutil.rb (default_warning): New method.
* test/ruby/test_autoload.rb: Use EnvUtil.default_warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index dd72daf477..e9a60ed5e0 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -122,6 +122,14 @@ module EnvUtil
end
module_function :verbose_warning
+ def default_warning
+ verbose, $VERBOSE = $VERBOSE, false
+ yield
+ ensure
+ $VERBOSE = verbose
+ end
+ module_function :default_warning
+
def suppress_warning
verbose, $VERBOSE = $VERBOSE, nil
yield