Ban deprecation warning related to Enumerable.sum

What does this MR do and why?

This is a follow-up from Fix Enumerable.sum deprecation warning (!129686 - merged)

Ban deprecation warning related to Enumerable.sum.

From now on the following deprecation warning will fail in developmen/test/CI:

DEPRECATION WARNING: 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.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Open the rails console:
rails c
  1. Enter the following message:
message = %{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.}
  1. Execute the following command:
ActiveSupport::Deprecation.warn(message)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Bojan Marjanovic

Merge request reports

Loading