Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Emilio Tagua miloops authored josevalim committed

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  activesupport/lib/active_support/deprecation.rb
3  activesupport/lib/active_support/deprecation.rb
@@ -52,7 +52,8 @@ def silence
52 52 private
53 53 def deprecation_message(callstack, message = nil)
54 54 message ||= "You are using deprecated behavior which will be removed from the next major or minor release."
55   - "DEPRECATION WARNING: #{message}. #{deprecation_caller_message(callstack)}"
  55 + message += '.' unless message =~ /\.$/
  56 + "DEPRECATION WARNING: #{message} #{deprecation_caller_message(callstack)}"
56 57 end
57 58
58 59 def deprecation_caller_message(callstack)

0 comments on commit ac7b5a2

Please sign in to comment.
Something went wrong with that request. Please try again.