]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/WhileUntilModifier in lib/redmine/utils.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 11:16:06 +0000 (11:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 11:16:06 +0000 (11:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18760 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/utils.rb

index 008bb94d7f0aa6ac58e5971f1424b24e44eec6dd..68d53def71e4bf7825ff8e79ae86dc8ddf606945 100644 (file)
@@ -1446,7 +1446,6 @@ Style/VariableInterpolation:
 Style/WhileUntilModifier:
   Exclude:
     - 'app/models/attachment.rb'
-    - 'lib/redmine/utils.rb'
 
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
index d9a3819e655b2acc8388a09cb9aefae1cb953bb3..6e9ccac0863185f577587652fe80b19860f3cd9a 100644 (file)
@@ -132,9 +132,7 @@ module Redmine
       def next_working_date(date)
         cwday = date.cwday
         days = 0
-        while non_working_week_days.include?(((cwday + days - 1) % 7) + 1)
-          days += 1
-        end
+        days += 1 while non_working_week_days.include?(((cwday + days - 1) % 7) + 1)
         date + days
       end