Skip to content
  • sonots's avatar
    93fe0ff2
    logger.rb: Fix handling progname · 93fe0ff2
    sonots authored
    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@gmail.com> [Fix GH-1667]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    93fe0ff2
    logger.rb: Fix handling progname
    sonots authored
    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@gmail.com> [Fix GH-1667]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Loading