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

Revert "Update the deprecation message for Enumerable#sum and Array#sum"

This reverts commit 20e20d56ab.

The deprecation message doesn't say when it will be removed, but just
say when it has deprecated.
This commit is contained in:
Ryuta Kamizono 2021-12-23 16:15:07 +09:00
parent 20e20d56ab
commit 9d2533203c
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ module ActiveRecord
if identity_or_column.nil?
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Rails 7.1 has deprecated Enumerable.sum in favor of Ruby's native implementation available since 2.4.
Rails 7.0 has deprecated Enumerable.sum in favor of Ruby's native implementation available since 2.4.
Sum of non-numeric elements requires an initial argument.
MSG
values.inject(:+) || 0

View file

@ -68,7 +68,7 @@ module Enumerable
_original_sum_with_required_identity(identity, &block)
else
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Rails 7.1 has deprecated Enumerable.sum in favor of Ruby's native implementation available since 2.4.
Rails 7.0 has deprecated Enumerable.sum in favor of Ruby's native implementation available since 2.4.
Sum of non-numeric elements requires an initial argument.
MSG
inject(:+) || 0