From: Go MAEDA Date: Tue, 20 Oct 2020 14:44:12 +0000 (+0000) Subject: Fix a RuboCop offence Style/MethodDefParentheses (#32530). X-Git-Tag: 4.2.0~665 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=84a4a4f8eda863750527a9254d0eddb1f0d63b83;p=redmine.git Fix a RuboCop offence Style/MethodDefParentheses (#32530). git-svn-id: http://svn.redmine.org/redmine/trunk@20152 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b6a9a0cd4..8458b87ca 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1152,13 +1152,6 @@ Style/MethodCallWithoutArgsParentheses: - 'lib/redmine/scm/adapters/cvs_adapter.rb' - 'lib/redmine/scm/adapters/filesystem_adapter.rb' -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline -Style/MethodDefParentheses: - Exclude: - - 'lib/redmine/menu_manager.rb' - Style/MethodMissingSuper: Exclude: - 'lib/redmine/views/builders/structure.rb' diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 3b8752a85..db8e3e79c 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -359,7 +359,7 @@ module Redmine @children.inject(1) {|sum, node| sum + node.size} end - def each &block + def each(&block) yield self children { |child| child.each(&block) } end