diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 11:16:06 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-19 11:16:06 +0000 |
commit | 868578c0f297875eeac324af8a8c7f1445593ecd (patch) | |
tree | 97375b70f3c53dd1c62e9edd7a6a8ce929323f3b | |
parent | 163e6eb6f73f94538f79ab65b4056774bbc0f7e4 (diff) | |
download | redmine-868578c0f297875eeac324af8a8c7f1445593ecd.tar.gz redmine-868578c0f297875eeac324af8a8c7f1445593ecd.zip |
code cleanup: rubocop: fix Style/WhileUntilModifier in lib/redmine/utils.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18760 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | lib/redmine/utils.rb | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 008bb94d7..68d53def7 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/lib/redmine/utils.rb b/lib/redmine/utils.rb index d9a3819e6..6e9ccac08 100644 --- a/lib/redmine/utils.rb +++ b/lib/redmine/utils.rb @@ -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 |