]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Style/RedundantSelfAssignment (#39887).
authorGo MAEDA <maeda@farend.jp>
Mon, 13 May 2024 08:12:09 +0000 (08:12 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 13 May 2024 08:12:09 +0000 (08:12 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22827 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/menu_manager.rb

index 609cdd834abdcc766348655b5e0ffa9137457519..3523536c631d2196de262626a32459d1bba142e1 100644 (file)
@@ -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:
index 19169cfb7596a022bc2113db656265b1692882aa..5846011e24602b9b7e9f058170dbaac0f6e390af 100644 (file)
@@ -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