Browse Source

Fix RuboCop offense Style/RedundantSelfAssignment (#39887).


git-svn-id: https://svn.redmine.org/redmine/trunk@22827 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/131/merge
Go MAEDA 2 weeks ago
parent
commit
2531e194f1
2 changed files with 1 additions and 6 deletions
  1. 0
    5
      .rubocop_todo.yml
  2. 1
    1
      lib/redmine/menu_manager.rb

+ 0
- 5
.rubocop_todo.yml View 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:

+ 1
- 1
lib/redmine/menu_manager.rb View 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

Loading…
Cancel
Save