Skip to content

Commit

Permalink
Allow deprecation messages with or without a final period.
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
miloops authored and josevalim committed Mar 25, 2010
1 parent 0022fa3 commit ac7b5a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion activesupport/lib/active_support/deprecation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ac7b5a2

Please sign in to comment.