]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in lib/diff.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:59 +0000 (15:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:54:59 +0000 (15:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18836 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/diff.rb

index c25f0ffce8f519e147c22e22382f6c59bf36ec29..c9b92159065373e8cbdbed031f9ee95c37654865 100644 (file)
@@ -1144,7 +1144,6 @@ Style/ParallelAssignment:
 Style/ParenthesesAroundCondition:
   Exclude:
     - 'app/models/repository/subversion.rb'
-    - 'lib/diff.rb'
     - 'lib/redmine/helpers/gantt.rb'
     - 'lib/redmine/scm/adapters/cvs_adapter.rb'
     - 'lib/redmine/scm/adapters/git_adapter.rb'
index 5c6eb4380c6633c6144a028ca20895a221feea98..ca451ddf08ef3de8d6e25beee7a7ac5c282a949f 100644 (file)
@@ -13,14 +13,14 @@ module RedmineDiff
       mvector = []
 
       # First we prune off any common elements at the beginning
-      while (astart <= afinish && bstart <= afinish && a[astart] == b[bstart])
+      while (astart <= afinish) && (bstart <= afinish) && (a[astart] == b[bstart])
         mvector[astart] = bstart
         astart += 1
         bstart += 1
       end
 
       # now the end
-      while (astart <= afinish && bstart <= bfinish && a[afinish] == b[bfinish])
+      while (astart <= afinish) && (bstart <= bfinish) && (a[afinish] == b[bfinish])
         mvector[afinish] = bfinish
         afinish -= 1
         bfinish -= 1