From 9e8d419070d5b3637031c186ba196b8ec8dfea19 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 18 May 2014 13:26:07 -0500 Subject: Use a case statement --- Library/Homebrew/extend/ENV/shared.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew') 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 -- cgit v1.2.3