From 639329cf80f0eadd77f6894fd02ceaa858baa84b Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Thu, 30 Jul 2015 18:07:07 +0100 Subject: [PATCH] xcode: update regex Ensures we capture Clang's fourth-digit when it exists. This seems to be on pre-release versions of OS X only, but is the cause of the misdetection of CLT up-to-date status on 10.11 several weeks ago. For full explanation, see Homebrew/homebrew#42261. Closes Homebrew/homebrew#42261. --- Library/Homebrew/os/mac/xcode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 2941f3d432..e6b2368995 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -178,7 +178,7 @@ module OS else version = `/usr/bin/clang --version` end - version = version[%r{clang-(\d+\.\d+\.\d+)}, 1] || "0" + version = version[%r{clang-(\d+\.\d+\.\d+(\.\d+)?)}, 1] || "0" version < latest_version end