[ruby-cvs:66558] sonots:r59380 (trunk): logger.rb: Fix handling progname

sonots at ruby-lang.org sonots at ruby-lang.org
Fri Jul 21 01:47:26 JST 2017


sonots	2017-07-21 01:47:26 +0900 (Fri, 21 Jul 2017)

  New Revision: 59380

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59380

  Log:
    logger.rb: Fix handling progname
    
    Because progname was memoized with ||= a logger call that involved
    outputting false would be nil. Example code:
    
      logger = Logger.new(STDOUT)
      logger.info(false)  # => nil
    
    Perform an explicit nil check instead of ||= so that false will be output.
    
    patched by Gavin Miller <gavingmiller at gmail.com> [Fix GH-1667]

  Modified files:
    trunk/lib/logger.rb
    trunk/test/logger/test_logger.rb


More information about the ruby-cvs mailing list