プロジェクト

全般

プロフィール

Vote #78086

完了

Remove iteration in ApplicationHelper#syntax_highlight_lines

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
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:
ステータス-->[Closed]

説明


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.
--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0