diff options
author | Matthew Eagar <meagar@gmail.com> | 2017-01-25 10:27:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-25 10:27:37 -0500 |
commit | 255babc98b650db7469653aba6405a60efc9e608 (patch) | |
tree | 82b8a1fe278d81bb11266648c44e55db5f53c46c /activesupport/lib | |
parent | e524327e510996ad741ba44c5403fe7353519e40 (diff) | |
parent | c6f7c18e25a7fb3719ae15c2d3662e340f63c164 (diff) | |
download | rails-255babc98b650db7469653aba6405a60efc9e608.tar.gz rails-255babc98b650db7469653aba6405a60efc9e608.tar.bz2 rails-255babc98b650db7469653aba6405a60efc9e608.zip |
Merge branch 'master' into fix-missing-partial-iteration
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/deprecation/proxy_wrappers.rb | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/number_helper.rb | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index 1c6618b19a..ce39e9a232 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -122,10 +122,11 @@ module ActiveSupport # (Backtrace information…) # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] class DeprecatedConstantProxy < DeprecationProxy - def initialize(old_const, new_const, deprecator = ActiveSupport::Deprecation.instance) + def initialize(old_const, new_const, deprecator = ActiveSupport::Deprecation.instance, message: "#{old_const} is deprecated! Use #{new_const} instead.") @old_const = old_const @new_const = new_const @deprecator = deprecator + @message = message end # Returns the class of the new constant. @@ -143,7 +144,7 @@ module ActiveSupport end def warn(callstack, called, args) - @deprecator.warn("#{@old_const} is deprecated! Use #{@new_const} instead.", callstack) + @deprecator.warn(@message, callstack) end end end diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb index 6000ea44be..da4e91e949 100644 --- a/activesupport/lib/active_support/number_helper.rb +++ b/activesupport/lib/active_support/number_helper.rb @@ -78,7 +78,7 @@ module ActiveSupport # (defaults to "%u%n"). Fields are <tt>%u</tt> for the # currency, and <tt>%n</tt> for the number. # * <tt>:negative_format</tt> - Sets the format for negative - # numbers (defaults to prepending an hyphen to the formatted + # numbers (defaults to prepending a hyphen to the formatted # number given by <tt>:format</tt>). Accepts the same fields # than <tt>:format</tt>, except <tt>%n</tt> is here the # absolute value of the number. |