diff options
| author | Jack Nagel | 2012-01-11 02:02:32 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-11 02:19:09 -0600 |
| commit | d106cfed06a145e28e2fb2b271d978df4bfe1db1 (patch) | |
| tree | 6412d1fe4ba8d72041e24518d55d32bfd99e72f3 /Library/Homebrew/utils.rb | |
| parent | 7423b79f3a59103ad32e0c732cb59c2411827a32 (diff) | |
| download | brew-d106cfed06a145e28e2fb2b271d978df4bfe1db1.tar.bz2 | |
Make MacOS.clang_build_version more useful
Let's choose the first \d{2,} as the build number, as it is the most
likely to indicate significant changes, and we need something to use for
comparison when selecting compilers.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 71317a8ef..97fa46f7b 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -343,8 +343,8 @@ module MacOS extend self def clang_build_version @clang_build_version ||= if File.exist? "/usr/bin/clang" - `/usr/bin/clang --version` =~ %r[tags/Apple/clang-(\d+(\.\d+)*)] - $1 + `/usr/bin/clang --version` =~ %r[tags/Apple/clang-(\d{2,})] + $1.to_i end end |
