プロジェクト

全般

プロフィール

Vote #78535

完了

Refactor "multiple_values_detail" struct creation

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

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

0%

予定工数:
category_id:
30
version_id:
99
issue_org_id:
26130
author_id:
291
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Hi,

In the "IssuesHelper#details_to_strings":/projects/redmine/repository/entry/trunk/app/helpers/issues_helper.rb method (source:trunk/app/helpers/issues_helper.rb@16387#L373) a new class (Struct) is created each time the method is called:


  multiple_values_detail = Struct.new(:property, :prop_key, :custom_field, :old_value, :value)

Although classes are garbage collected in recent Ruby versions, it might be better to use a constant definition outside the method, like:


  MultipleValuesDetail = Struct.new(:property, :prop_key, :custom_field, :old_value, :value)

Regards,
Thomas


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Change committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I think target version should be version:3.5.0 because there is no 3.5-stable in Subversion.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン4.0.0_99 にセット

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

いいね!0
いいね!0