mirror of
https://github.com/redmine/redmine.git
synced 2025-12-17 05:50:29 +01:00
code cleanup: rubocop: fix Style/WhileUntilModifier in lib/redmine/unified_diff.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18759 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1446,7 +1446,6 @@ Style/VariableInterpolation:
|
||||
Style/WhileUntilModifier:
|
||||
Exclude:
|
||||
- 'app/models/attachment.rb'
|
||||
- 'lib/redmine/unified_diff.rb'
|
||||
- 'lib/redmine/utils.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
|
||||
@@ -203,11 +203,13 @@ module Redmine
|
||||
if line_left.present? && line_right.present? && line_left != line_right
|
||||
max = [line_left.size, line_right.size].min
|
||||
starting = 0
|
||||
while starting < max && line_left[starting] == line_right[starting]
|
||||
while starting < max &&
|
||||
line_left[starting] == line_right[starting]
|
||||
starting += 1
|
||||
end
|
||||
ending = -1
|
||||
while ending >= -(max - starting) && (line_left[ending] == line_right[ending])
|
||||
while ending >= -(max - starting) &&
|
||||
(line_left[ending] == line_right[ending])
|
||||
ending -= 1
|
||||
end
|
||||
unless starting == 0 && ending == -1
|
||||
|
||||
Reference in New Issue
Block a user