diff options
| author | Jack Nagel | 2014-08-03 10:47:47 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-08-03 10:47:47 -0500 | 
| commit | f6f1371149e3da645f63005acec548ad27bcf812 (patch) | |
| tree | 536033160b6fd37f2d169fb1642faf138eed2790 /Library/Homebrew/compilers.rb | |
| parent | 87c2e245341d7ab3d63f1ed3c3916fd83eabcacb (diff) | |
| download | homebrew-f6f1371149e3da645f63005acec548ad27bcf812.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 | 
