From 2bded596ecece11fe4ba34e851e14d91e2f5d19a Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 25 Aug 2014 04:03:33 +0000 Subject: [PATCH] logger.rb: simplify * lib/logger.rb (format_datetime): simplify and freeze the default format so that it can be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/logger.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/logger.rb b/lib/logger.rb index 9b8bac8e48..530b718cde 100644 --- a/lib/logger.rb +++ b/lib/logger.rb @@ -510,11 +510,7 @@ private private def format_datetime(time) - if @datetime_format.nil? - time.strftime("%Y-%m-%dT%H:%M:%S.%6N ") - else - time.strftime(@datetime_format) - end + time.strftime(@datetime_format || "%Y-%m-%dT%H:%M:%S.%6N ".freeze) end def msg2str(msg)