aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-03 10:47:47 -0500
committerJack Nagel2014-08-03 10:47:47 -0500
commit2fedd5b09ad9b3a2b9f80a1cb8b3b2d13ff7b5f5 (patch)
tree5d62de663d1091a19c4468c42a2a67f37cfc9bfe /Library
parentfded4d0385171877bc6e60a2f265a2095be652da (diff)
downloadbrew-2fedd5b09ad9b3a2b9f80a1cb8b3b2d13ff7b5f5.tar.bz2
Don't pass nil to fails_with?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compilers.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index c1e22f702..34b7d6963 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -116,15 +116,10 @@ class CompilerSelector
# Attempts to select an appropriate alternate compiler, but
# if none can be found raises CompilerError instead
def compiler
- begin
- cc = @compilers.pop
- end while @f.fails_with?(cc)
-
- if cc.nil?
- raise CompilerSelectionError.new(@f)
- else
- cc.name
+ while cc = @compilers.pop
+ return cc.name unless @f.fails_with?(cc)
end
+ raise CompilerSelectionError.new(@f)
end
private