Actions
Patch #24713
closedRemove iteration in ApplicationHelper#syntax_highlight_lines
Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:
0%
Estimated time:
Description
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)
       Updated by Jean-Philippe Lang almost 9 years ago
      Updated by Jean-Philippe Lang almost 9 years ago
      
    
    - Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
Committed, thanks.
Actions