diff options
| author | Jack Nagel | 2014-05-13 12:13:05 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-13 12:14:51 -0500 |
| commit | deb65a959d6b1a8434b0304f6389a6e8065d1e25 (patch) | |
| tree | b48e9c40560e8663b6dfcdeb799677889bb93bf3 /Library | |
| parent | 002cb64774ba04a147dfb84c2132361325726ad1 (diff) | |
| download | brew-deb65a959d6b1a8434b0304f6389a6e8065d1e25.tar.bz2 | |
Use a case statement
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/ENV/super.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index f35fa1ff3..699ac6f4b 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -133,16 +133,14 @@ module Superenv # Homebrew's apple-gcc42 will be outside the PATH in superenv, # so xcrun may not be able to find it - if self['HOMEBREW_CC'] == 'gcc-4.2' - apple_gcc42 = begin - Formulary.factory('apple-gcc42') + case self["HOMEBREW_CC"] + when "gcc-4.2" + begin + apple_gcc42 = Formulary.factory('apple-gcc42') rescue Exception # in --debug, catch bare exceptions too - nil end paths << apple_gcc42.opt_bin.to_s if apple_gcc42 - end - - if self['HOMEBREW_CC'] =~ GNU_GCC_REGEXP + when GNU_GCC_REGEXP gcc_formula = gcc_version_formula($1) paths << gcc_formula.opt_bin.to_s end |
