Patch #38146 » 0009-Fix-RuboCop-offense-Performance-Sum.patch
.rubocop_todo.yml | ||
---|---|---|
486 | 486 |
- 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb' |
487 | 487 |
- 'test/unit/project_test.rb' |
488 | 488 | |
489 |
# This cop supports unsafe autocorrection (--autocorrect-all). |
|
490 |
# Configuration parameters: OnlySumOrWithInitialValue. |
|
491 |
Performance/Sum: |
|
492 |
Exclude: |
|
493 |
- 'app/helpers/issues_helper.rb' |
|
494 | ||
495 | 489 |
# This cop supports safe autocorrection (--autocorrect). |
496 | 490 |
# Configuration parameters: Include. |
497 | 491 |
# Include: app/models/**/*.rb |
app/helpers/issues_helper.rb | ||
---|---|---|
343 | 343 |
end |
344 | 344 | |
345 | 345 |
def to_html |
346 |
# rubocop:disable Performance/Sum |
|
346 | 347 |
content = |
347 | 348 |
content_tag('div', @left.reduce(&:+), :class => 'splitcontentleft') + |
348 | 349 |
content_tag('div', @right.reduce(&:+), :class => 'splitcontentleft') |
350 |
# rubocop:enable Performance/Sum |
|
349 | 351 | |
350 | 352 |
content_tag('div', content, :class => 'splitcontent') |
351 | 353 |
end |