diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 6e2843e309..daa0874b3c 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -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 diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index c34addae8c..0306f857c3 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -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 diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 05006cd9e5..a16f924ff9 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -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