1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Allow deprecation messages with or without a final period.

This commit is contained in:
Jeremy Kemper 2010-03-05 12:35:42 -08:00
parent a82cf0a932
commit 8fc97d198e

View file

@ -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)