diff options
| author | Jack Nagel | 2014-06-16 16:57:55 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-16 16:58:13 -0500 |
| commit | 9d030f83970f90d841494f0faf897e828e1ca33d (patch) | |
| tree | bf47bd85096b1775acbc8762d1a2cdbf40a61382 /Library/Homebrew | |
| parent | be1822dd728b4ca3d6b3be528ae067de482810e4 (diff) | |
| download | brew-9d030f83970f90d841494f0faf897e828e1ca33d.tar.bz2 | |
Combine conditionals
Diffstat (limited to 'Library/Homebrew')
| -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 |
