From e5d15c031bd781895364741aa5834d3f91a0d497 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Jan 2017 22:41:52 +0000 Subject: [PATCH] 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 --- app/helpers/application_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 30bd8eb14..13075126d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) -- 2.39.5