提交 8fc97d19 编写于 作者: J Jeremy Kemper

Allow deprecation messages with or without a final period.

上级 a82cf0a9
......@@ -29,7 +29,8 @@ def deprecated_method_warning(method_name, message = nil)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册