diff options
| author | Jack Nagel | 2014-05-18 13:26:07 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-18 14:23:45 -0500 |
| commit | 5e4c48fa6c92188f84dc5c35749b039e74a6f072 (patch) | |
| tree | 9f1d83ab58e173cf16be8ff03ecbb94a985f3768 /Library/Homebrew/extend | |
| parent | 1dbe1a47701a7dd85c2ca3eb5c1b35a472ffac8f (diff) | |
| download | homebrew-5e4c48fa6c92188f84dc5c35749b039e74a6f072.tar.bz2 | |
Use a case statement
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ENV/shared.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index b7db7df62..2c0ebbbf8 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -92,7 +92,9 @@ module SharedEnvExtension def compiler @compiler ||= if (cc = ARGV.cc) COMPILER_SYMBOL_MAP.fetch(cc) do |other| - if other =~ GNU_GCC_REGEXP then other + case other + when GNU_GCC_REGEXP + other else raise "Invalid value for --cc: #{other}" end |
