Use a case statement

This commit is contained in:
Jack Nagel 2014-05-18 13:26:07 -05:00
parent dfea2b6045
commit 9e8d419070

View File

@ -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