Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow deprecation messages with or without a final period.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit ac7b5a23ba44bb28757a569baad8b70a5dca61f5 1 parent 0022fa3
@miloops miloops authored josevalim committed
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)
Please sign in to comment.
Something went wrong with that request. Please try again.