プロジェクト

全般

プロフィール

Vote #81109

完了

Replace Hash#merge! with Hash#[]=

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

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

0%

予定工数:
category_id:
53
version_id:
152
issue_org_id:
34160
author_id:
332
assigned_to_id:
332
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@Hash#[]=@ is faster than @Hash#merge!@.

https://docs.rubocop.org/rubocop-performance/cops_performance.html#performanceredundantmerge
https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code

Replacement can be done with RuboCop:

bundle exec rubocop --only Performance/RedundantMerge -a

journals

Done.
--------------------------------------------------------------------------------

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

Admin Redmine さんが3年以上前に更新

  • カテゴリPerformance_53 にセット
  • 対象バージョン4.2.0_152 にセット

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

いいね!0
いいね!0