diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index 88897f811e..314c926ac0 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -373,7 +373,6 @@ module ActiveSupport return "0 seconds" if parts.empty? parts. - reduce(::Hash.new(0)) { |h, (l, r)| h[l] += r; h }. sort_by { |unit, _ | PARTS.index(unit) }. map { |unit, val| "#{val} #{val == 1 ? unit.to_s.chop : unit.to_s}" }. to_sentence(locale: ::I18n.default_locale)