Project

General

Profile

Actions

Patch #26130

closed

Refactor "multiple_values_detail" struct creation

Added by Thomas Löber almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

In the IssuesHelper#details_to_strings 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

Actions

Also available in: Atom PDF