ruby-changes:24432
From: drbrain <ko1@a...>
Date: Sat, 21 Jul 2012 08:42:06 +0900 (JST)
Subject: [ruby-changes:24432] drbrain:r36483 (trunk): * lib/logger.rb: Updated example in Logger comment to match other
drbrain 2012-07-21 08:41:51 +0900 (Sat, 21 Jul 2012) New Revision: 36483 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36483 Log: * lib/logger.rb: Updated example in Logger comment to match other examples and fixed a bug. Patch by Marcus Stollsteimer. [Bug #6759] Modified files: trunk/ChangeLog trunk/lib/logger.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36482) +++ ChangeLog (revision 36483) @@ -1,3 +1,9 @@ +Sat Jul 21 08:41:14 2012 Eric Hodel <drbrain@s...> + + * lib/logger.rb: Updated example in Logger comment to match other + examples and fixed a bug. Patch by Marcus Stollsteimer. + [Bug #6759] + Fri Jul 20 17:20:54 2012 Nobuyoshi Nakada <nobu@r...> * random.c (rb_random_real): refine error message. Index: lib/logger.rb =================================================================== --- lib/logger.rb (revision 36482) +++ lib/logger.rb (revision 36483) @@ -57,22 +57,24 @@ # # require 'logger' # -# log = Logger.new(STDOUT) -# log.level = Logger::WARN +# logger = Logger.new(STDOUT) +# logger.level = Logger::WARN # -# log.debug("Created logger") -# log.info("Program started") -# log.warn("Nothing to do!") +# logger.debug("Created logger") +# logger.info("Program started") +# logger.warn("Nothing to do!") # +# path = "a_non_existent_file" +# # begin -# File.each_line(path) do |line| +# File.foreach(path) do |line| # unless line =~ /^(\w+) = (.*)$/ -# log.error("Line in wrong format: #{line}") +# logger.error("Line in wrong format: #{line.chomp}") # end # end # rescue => err -# log.fatal("Caught exception; exiting") -# log.fatal(err) +# logger.fatal("Caught exception; exiting") +# logger.fatal(err) # end # # Because the Logger's level is set to +WARN+, only the warning, error, and -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/