From 8fc97d198ef31c1d7a4b9b849b96fc08a667fb02 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 5 Mar 2010 12:35:42 -0800 Subject: Allow deprecation messages with or without a final period. --- activesupport/lib/active_support/deprecation/reporting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3