Permalink
Browse files

Allow deprecation messages with or without a final period.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 0022fa3 commit ac7b5a23ba44bb28757a569baad8b70a5dca61f5 @miloops miloops committed with josevalim Mar 25, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/deprecation.rb
View
3 activesupport/lib/active_support/deprecation.rb
@@ -52,7 +52,8 @@ def silence
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)

0 comments on commit ac7b5a2

Please sign in to comment.