diff options
| author | Jack Nagel | 2014-06-16 16:57:55 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-16 16:58:13 -0500 |
| commit | a786e977d4a9a3002010a3c392a53a04c45705e5 (patch) | |
| tree | 01d36948ca31a77c5d9a02e758b8e7b9dac5a9ab | |
| parent | 0da76ec35587314c27cdd3da4fea366918199ed8 (diff) | |
| download | homebrew-a786e977d4a9a3002010a3c392a53a04c45705e5.tar.bz2 | |
Combine conditionals
| -rw-r--r-- | Library/Homebrew/compilers.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index 2d10074e1..e60322060 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -45,21 +45,16 @@ class CompilerFailure end def initialize compiler, &block + instance_eval(&block) if block_given? # Non-Apple compilers are in the format fails_with compiler => version if compiler.is_a? Hash # currently the only compiler for this case is GCC _, @major_version = compiler.first @compiler = 'gcc-' + @major_version - else - @compiler = compiler - end - - instance_eval(&block) if block_given? - - if compiler.is_a? Hash # so fails_with :gcc => '4.8' simply marks all 4.8 releases incompatible @version ||= @major_version + '.999' else + @compiler = compiler @version ||= 9999 @version = @version.to_i end |
