Require Ruby 2.6.8

This commit is contained in:
Bo Anderson 2021-11-08 18:39:21 +00:00
parent 404850600f
commit d0f6f7d52b
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
3 changed files with 4 additions and 13 deletions

View File

@ -458,9 +458,7 @@ then
# Set a variable when the macOS system Ruby is new enough to avoid spawning
# a Ruby process unnecessarily.
# On Catalina the system Ruby is technically new enough but don't allow it:
# https://github.com/Homebrew/brew/issues/9410
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "101600" ]]
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "120000" ]]
then
unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
else

View File

@ -201,19 +201,12 @@ module Homebrew
end
def check_ruby_version
# TODO: require 2.6.8 for everyone once enough have updated to Monterey
required_version = if MacOS.version >= :monterey ||
ENV["HOMEBREW_RUBY_PATH"].to_s.include?("/vendor/portable-ruby/")
"2.6.8"
else
HOMEBREW_REQUIRED_RUBY_VERSION
end
return if RUBY_VERSION == required_version
return if RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION
return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?
<<~EOS
Ruby version #{RUBY_VERSION} is unsupported on macOS #{MacOS.version}. Homebrew
is developed and tested on Ruby #{required_version}, and may not work correctly
is developed and tested on Ruby #{HOMEBREW_REQUIRED_RUBY_VERSION}, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies.
EOS

View File

@ -1,4 +1,4 @@
export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.3
export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.8
# HOMEBREW_LIBRARY is from the user environment
# shellcheck disable=SC2154