From a2f306998883c5ad1ca6e85a9afccba2205c9cdb Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Nov 2016 02:39:09 +0000 Subject: [PATCH] test_logger.rb: suppress a warning * test/logger/test_logger.rb (test_datetime_format): suppress warning when strftime called with empty format string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/logger/test_logger.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb index ce3952352c..628da99447 100644 --- a/test/logger/test_logger.rb +++ b/test/logger/test_logger.rb @@ -121,6 +121,7 @@ class TestLogger < Test::Unit::TestCase end def test_datetime_format + verbose, $VERBOSE = $VERBOSE, false dummy = STDERR logger = Logger.new(dummy) log = log_add(logger, INFO, "foo") @@ -131,6 +132,8 @@ class TestLogger < Test::Unit::TestCase logger.datetime_format = "" log = log_add(logger, INFO, "foo") assert_match(/^$/, log.datetime) + ensure + $VERBOSE = verbose end def test_formatter