diff --git a/Library/Homebrew/rubocops/components_order.rb b/Library/Homebrew/rubocops/components_order.rb index 7b6fc8c8ba..1a8f0ea13b 100644 --- a/Library/Homebrew/rubocops/components_order.rb +++ b/Library/Homebrew/rubocops/components_order.rb @@ -125,7 +125,8 @@ module RuboCop end def check_on_system_block_content(component_precedence_list, on_system_block) - if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) + if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) && + on_system_block.body.method_name != :fails_with offending_node(on_system_block) problem "Nest `#{on_system_block.method_name}` blocks inside `#{on_system_block.body.method_name}` " \ "blocks when there is only one inner block." do |corrector|