diff --git a/Library/.rubocop_todo.yml b/Library/.rubocop_todo.yml index 47a262a764..7bbad3c872 100644 --- a/Library/.rubocop_todo.yml +++ b/Library/.rubocop_todo.yml @@ -42,11 +42,6 @@ Lint/NestedMethodDefinition: - 'Homebrew/dev-cmd/bottle.rb' - 'Homebrew/dev-cmd/test-bot.rb' -# Offense count: 2 -Lint/NonLocalExitFromIterator: - Exclude: - - 'Homebrew/extend/pathname.rb' - # Offense count: 28 Lint/RescueException: Exclude: diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 5dce906b98..68029dc387 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -71,13 +71,13 @@ class Pathname when Array if src.empty? opoo "tried to install empty array to #{self}" - return + break end src.each { |s| install_p(s, File.basename(s)) } when Hash if src.empty? opoo "tried to install empty hash to #{self}" - return + break end src.each { |s, new_basename| install_p(s, new_basename) } else