aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-03-05 12:35:42 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2010-03-05 12:35:42 -0800
commit8fc97d198ef31c1d7a4b9b849b96fc08a667fb02 (patch)
tree17640f4fb93b6c48a66199eba4ef4ff3a28e9c7a
parenta82cf0a9327d85f5787427e1d06d0ae374b11103 (diff)
downloadrails-8fc97d198ef31c1d7a4b9b849b96fc08a667fb02.tar.gz
rails-8fc97d198ef31c1d7a4b9b849b96fc08a667fb02.tar.bz2
rails-8fc97d198ef31c1d7a4b9b849b96fc08a667fb02.zip
Allow deprecation messages with or without a final period.
-rw-r--r--activesupport/lib/active_support/deprecation/reporting.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb
index fcb05ad8d9..03c445ffbf 100644
--- a/activesupport/lib/active_support/deprecation/reporting.rb
+++ b/activesupport/lib/active_support/deprecation/reporting.rb
@@ -29,7 +29,8 @@ module ActiveSupport
private
def deprecation_message(callstack, message = nil)
message ||= "You are using deprecated behavior which will be removed from the next major or minor release."
- "DEPRECATION WARNING: #{message}. #{deprecation_caller_message(callstack)}"
+ message += '.' unless message =~ /\.$/
+ "DEPRECATION WARNING: #{message} #{deprecation_caller_message(callstack)}"
end
def deprecation_caller_message(callstack)