diff options
author | Go MAEDA <maeda@farend.jp> | 2024-05-13 08:12:09 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-05-13 08:12:09 +0000 |
commit | 2531e194f157e687a79b9db9fd8cf104eb66a103 (patch) | |
tree | 9c884339327376438b230083aa6d2c01871fed70 | |
parent | fb9bc74dd4781adf0a79e1b05c1ccb034b3e424b (diff) | |
download | redmine-2531e194f157e687a79b9db9fd8cf104eb66a103.tar.gz redmine-2531e194f157e687a79b9db9fd8cf104eb66a103.zip |
Fix RuboCop offense Style/RedundantSelfAssignment (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22827 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .rubocop_todo.yml | 5 | ||||
-rw-r--r-- | lib/redmine/menu_manager.rb | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 609cdd834..3523536c6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1421,11 +1421,6 @@ Style/RedundantReturn: Style/RedundantSelf: Enabled: false -# This cop supports unsafe autocorrection (--autocorrect-all). -Style/RedundantSelfAssignment: - Exclude: - - 'lib/redmine/menu_manager.rb' - # This cop supports safe autocorrection (--autocorrect). Style/RedundantSelfAssignmentBranch: Exclude: diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 19169cfb7..5846011e2 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -381,7 +381,7 @@ module Redmine # Adds a child at given position def add_at(child, position) - @children = @children.insert(position, child) + @children.insert(position, child) child.parent = self child end |