aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-28 14:09:35 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-28 14:09:35 +0000
commitccb87e2f6984d64bc463bfd75ec78dac75a8a98c (patch)
tree3713745737a7263b41e57759f4f22c94b78445c7 /activesupport/lib
parentbbdb4e55f6eceb40c2047c614f5b47cef253dfb0 (diff)
downloadrails-ccb87e2f6984d64bc463bfd75ec78dac75a8a98c.tar.gz
rails-ccb87e2f6984d64bc463bfd75ec78dac75a8a98c.tar.bz2
rails-ccb87e2f6984d64bc463bfd75ec78dac75a8a98c.zip
BufferedLogger#add converts the message to a string. Closes #9724.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/buffered_logger.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb
index a3715e2e84..9b840091a5 100644
--- a/activesupport/lib/active_support/buffered_logger.rb
+++ b/activesupport/lib/active_support/buffered_logger.rb
@@ -51,7 +51,7 @@ module ActiveSupport
def add(severity, message = nil, progname = nil, &block)
return if @level > severity
- message = message || (block && block.call) || progname
+ message = (message || (block && block.call) || progname).to_s
# If a newline is necessary then create a new message ending with a newline.
# Ensures that the original message is not mutated.
message = "#{message}\n" unless message[-1] == ?\n