portable-ruby: fix installation on Leopard.

Download it insecurely there and require `rubygems` for `Gem::Version`.
This commit is contained in:
Mike McQuaid 2017-09-25 15:46:58 +01:00
parent 3cd2373e2f
commit 598ea0cdec
2 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,11 @@ fetch() {
curl_args[${#curl_args[*]}]="--progress-bar"
fi
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100600" ]]
then
curl_args[${#curl_args[*]}]="--insecure"
fi
temporary_path="$CACHED_LOCATION.incomplete"
mkdir -p "$HOMEBREW_CACHE"

View File

@ -37,7 +37,7 @@ setup-ruby-path() {
if [[ -n "$HOMEBREW_RUBY_PATH" ]]
then
ruby_old_version="$("$HOMEBREW_RUBY_PATH" -e "puts Gem::Version.new('$minimum_ruby_version') > Gem::Version.new(RUBY_VERSION)")"
ruby_old_version="$("$HOMEBREW_RUBY_PATH" -rrubygems -e "puts Gem::Version.new('$minimum_ruby_version') > Gem::Version.new(RUBY_VERSION)")"
fi
if [[ "$ruby_old_version" == "true" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]]