]> source.dussan.org Git - redmine.git/commitdiff
Fixes for Performance/BigDecimalWithNumericArgument introduced in RuboCop Performance...
authorGo MAEDA <maeda@farend.jp>
Sat, 25 Dec 2021 08:59:22 +0000 (08:59 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 25 Dec 2021 08:59:22 +0000 (08:59 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@21326 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index b51e186cb3781ace0464121b279b8e81c306f7fd..1f12d79487543e4e5fd5e7e3693d93ab27e07152 100644 (file)
@@ -1840,7 +1840,7 @@ class Issue < ActiveRecord::Base
                 child_with_total_estimated_hours.sum(&:total_estimated_hours).to_d /
                   child_with_total_estimated_hours.count
             else
-              average = 1.0.to_d
+              average = BigDecimal('1.0')
             end
             done = children.sum do |c|
               estimated = (c.total_estimated_hours || 0.0).to_d