diff options
| author | Jack Nagel | 2014-08-03 10:47:47 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-08-03 10:47:47 -0500 | 
| commit | 2fedd5b09ad9b3a2b9f80a1cb8b3b2d13ff7b5f5 (patch) | |
| tree | 5d62de663d1091a19c4468c42a2a67f37cfc9bfe /Library/Homebrew/compilers.rb | |
| parent | fded4d0385171877bc6e60a2f265a2095be652da (diff) | |
| download | brew-2fedd5b09ad9b3a2b9f80a1cb8b3b2d13ff7b5f5.tar.bz2 | |
Don't pass nil to fails_with?
Diffstat (limited to 'Library/Homebrew/compilers.rb')
| -rw-r--r-- | Library/Homebrew/compilers.rb | 11 | 
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  | 
