diff options
| author | Jack Nagel | 2014-06-09 21:36:36 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-09 21:36:36 -0500 |
| commit | 83f2ee5aeabc55bc0806a7be168eaa272dc84ca5 (patch) | |
| tree | 86290cfd7f332620948b2b591313e17b84438664 /Library/Homebrew/test | |
| parent | fdcbc5e4dbd2a8cec9cdf785d43098314cd06e7c (diff) | |
| download | brew-83f2ee5aeabc55bc0806a7be168eaa272dc84ca5.tar.bz2 | |
Use RbConfig.ruby if it's available
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/testing_env.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index c3dcf8957..f0bd1726d 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -29,8 +29,14 @@ HOMEBREW_VERSION = '0.9-test' require 'tap_constants' -RUBY_BIN = Pathname.new(RbConfig::CONFIG['bindir']) -RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'] +if RbConfig.respond_to?(:ruby) + RUBY_PATH = Pathname.new(RbConfig.ruby) +else + RUBY_PATH = Pathname.new(RbConfig::CONFIG["bindir"]).join( + RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"] + ) +end +RUBY_BIN = RUBY_PATH.dirname MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp MACOS_VERSION = ENV.fetch('MACOS_VERSION') { MACOS_FULL_VERSION[/10\.\d+/] } |
