1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-05 16:43:25 +00:00

Remove iteration in ApplicationHelper#syntax_highlight_lines (#24713).

Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16164 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-01-08 22:41:52 +00:00
parent aa030bf39a
commit e5d15c031b

View File

@ -466,9 +466,7 @@ module ApplicationHelper
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)