Skip to content

Commit 8d65078

Browse files
committed
Fix RuboCop offense Style/For (#32530).
git-svn-id: http://svn.redmine.org/redmine/trunk@20153 e93f8b46-1217-0410-a6f0-8f06a7374b81
1 parent 84a4a4f commit 8d65078

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,14 +1041,6 @@ Style/EvalWithLocation:
10411041
Style/ExpandPathArguments:
10421042
Enabled: false
10431043

1044-
# Cop supports --auto-correct.
1045-
# Configuration parameters: EnforcedStyle.
1046-
# SupportedStyles: each, for
1047-
Style/For:
1048-
Exclude:
1049-
- 'lib/redmine/export/pdf/issues_pdf_helper.rb'
1050-
- 'lib/redmine/export/pdf/wiki_pdf_helper.rb'
1051-
10521044
# Cop supports --auto-correct.
10531045
# Configuration parameters: EnforcedStyle.
10541046
# SupportedStyles: format, sprintf, percent

lib/redmine/export/pdf/issues_pdf_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def issue_to_pdf(issue, assoc={})
189189
pdf.SetFontStyle('B',9)
190190
pdf.RDMCell(190,5, l(:label_associated_revisions), "B")
191191
pdf.ln
192-
for changeset in issue.changesets
192+
issue.changesets.each do |changeset|
193193
pdf.SetFontStyle('B',8)
194194
csstr = "#{l(:label_revision)} #{changeset.format_identifier} - "
195195
csstr += format_time(changeset.committed_on) + " - " + changeset.author.to_s
@@ -240,7 +240,7 @@ def issue_to_pdf(issue, assoc={})
240240
pdf.SetFontStyle('B',9)
241241
pdf.RDMCell(190,5, l(:label_attachment_plural), "B")
242242
pdf.ln
243-
for attachment in issue.attachments
243+
issue.attachments.each do |attachment|
244244
pdf.SetFontStyle('',8)
245245
pdf.RDMCell(80,5, attachment.filename)
246246
pdf.RDMCell(20,5, number_to_human_size(attachment.filesize),0,0,"R")

lib/redmine/export/pdf/wiki_pdf_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def write_wiki_page(pdf, page)
8787
pdf.SetFontStyle('B', 9)
8888
pdf.RDMCell(190, 5, l(:label_attachment_plural), "B")
8989
pdf.ln
90-
for attachment in page.attachments
90+
page.attachments.each do |attachment|
9191
pdf.SetFontStyle('', 8)
9292
pdf.RDMCell(80, 5, attachment.filename)
9393
pdf.RDMCell(20, 5, number_to_human_size(attachment.filesize), 0, 0, "R")

0 commit comments

Comments
 (0)