diff options
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+/] } |
