Ticket #9703: comment_correction_for_buffered_logger_mutation_note.2.diff
| File comment_correction_for_buffered_logger_mutation_note.2.diff, 0.7 kB (added by tomafro, 1 year ago) |
|---|
-
activesupport/lib/active_support/buffered_logger.rb
old new 52 52 def add(severity, message = nil, progname = nil, &block) 53 53 return if @level > severity 54 54 message = message || (block && block.call) || progname 55 # If a newline is ne ssesary then create a new message end with a newline.55 # If a newline is necessary then create a new message ending with a newline. 56 56 # Ensures that the original message is not mutated. 57 57 message = "#{message}\n" unless message[-1] == ?\n 58 58 @buffer << message