Fix Lint/NonLocalExitFromIterator.

This commit is contained in:
Markus Reiter 2016-09-21 09:58:26 +02:00
parent 0b473ebba9
commit 4be3aff253
2 changed files with 2 additions and 7 deletions

View File

@ -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:

View File

@ -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