Vote #78086
完了Remove iteration in ApplicationHelper#syntax_highlight_lines
開始日:
2022/05/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
30
version_id:
119
issue_org_id:
24713
author_id:
332
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
Index: app/helpers/application_helper.rb
===================================================================
--- app/helpers/application_helper.rb (revision 16111)
+++ app/helpers/application_helper.rb (working copy)
@@ -466,9 +466,7 @@
end
def syntax_highlight_lines(name, content)
- lines = []
- syntax_highlight(name, content).each_line { |line| lines << line }
- lines
+ syntax_highlight(name, content).each_line.to_a
end
def syntax_highlight(name, content)
journals
--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------
いいね!0