diff options
| author | Jack Nagel | 2014-05-13 12:13:05 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-13 12:14:51 -0500 |
| commit | e7abfced2515e37fdfbbaeb7c410372c6f6aa54d (patch) | |
| tree | 0072f85ee178d5e11d5ee064c3c21d34c3c36d16 /Library/Homebrew/extend | |
| parent | afc54d07d8115c6f7c70e6481cc4b1af86b5bcda (diff) | |
| download | homebrew-e7abfced2515e37fdfbbaeb7c410372c6f6aa54d.tar.bz2 | |
Use a case statement
Diffstat (limited to 'Library/Homebrew/extend')
| -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 |
