aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-21 09:58:26 +0200
committerMarkus Reiter2016-09-23 15:30:06 +0200
commit4be3aff253d56b65067a747795a4c46d602fa0c1 (patch)
tree8c4bc8b487daa3e268d77c6f6a9d842db825e69b /Library
parent0b473ebba9c84724274d8d49d1ddc88de3479b7f (diff)
downloadbrew-4be3aff253d56b65067a747795a4c46d602fa0c1.tar.bz2
Fix Lint/NonLocalExitFromIterator.
Diffstat (limited to 'Library')
-rw-r--r--Library/.rubocop_todo.yml5
-rw-r--r--Library/Homebrew/extend/pathname.rb4
2 files changed, 2 insertions, 7 deletions
diff --git a/Library/.rubocop_todo.yml b/Library/.rubocop_todo.yml
index 47a262a76..7bbad3c87 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 5dce906b9..68029dc38 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