ruby-changes:44490
From: nobu <ko1@a...>
Date: Sat, 5 Nov 2016 11:39:13 +0900 (JST)
Subject: [ruby-changes:44490] nobu:r56563 (trunk): test_logger.rb: suppress a warning
nobu 2016-11-05 11:39:09 +0900 (Sat, 05 Nov 2016) New Revision: 56563 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56563 Log: test_logger.rb: suppress a warning * test/logger/test_logger.rb (test_datetime_format): suppress warning when strftime called with empty format string. Modified files: trunk/test/logger/test_logger.rb Index: test/logger/test_logger.rb =================================================================== --- test/logger/test_logger.rb (revision 56562) +++ test/logger/test_logger.rb (revision 56563) @@ -121,6 +121,7 @@ class TestLogger < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/logger/test_logger.rb#L121 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 https://github.com/ruby/ruby/blob/trunk/test/logger/test_logger.rb#L132 logger.datetime_format = "" log = log_add(logger, INFO, "foo") assert_match(/^$/, log.datetime) + ensure + $VERBOSE = verbose end def test_formatter -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/