diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index bee174215e..f9ee864282 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -265,4 +265,4 @@ RUBY VERSION ruby 2.6.8p205 BUNDLED WITH - 2.3.24 + 2.3.26 diff --git a/Library/Homebrew/rubyext/rubygems/defaults/operating_system.rb b/Library/Homebrew/rubyext/rubygems/defaults/operating_system.rb deleted file mode 100644 index be492566df..0000000000 --- a/Library/Homebrew/rubyext/rubygems/defaults/operating_system.rb +++ /dev/null @@ -1,32 +0,0 @@ -# typed: false -# frozen_string_literal: true - -# Fixes universal-ruby getting confused whether to install arm64 or x86_64 macOS versions. -# This can be removed when integrated into Bundler: https://github.com/rubygems/rubygems/pull/5978 -module Gem - # @private - class Specification - if /^universal\.(?.*?)-/ =~ (CROSS_COMPILING || RUBY_PLATFORM) - local_platform = Platform.local - if local_platform.cpu == "universal" - ORIGINAL_LOCAL_PLATFORM = local_platform.to_s.freeze - - local_platform.cpu = if arch == "arm64e" # arm64e is only permitted for Apple system binaries - "arm64" - else - arch - end - - def extensions_dir - Gem.default_ext_dir_for(base_dir) || - File.join(base_dir, "extensions", ORIGINAL_LOCAL_PLATFORM, - Gem.extension_api_version) - end - end - end - end -end - -# This doesn't currently exist in system Ruby but it's safer to check. -orig_file = File.join(RbConfig::CONFIG["rubylibdir"], "rubygems", "defaults", "operating_system") -require orig_file if File.exist?(orig_file) diff --git a/Library/Homebrew/shims/ruby/bundle b/Library/Homebrew/shims/ruby/bundle deleted file mode 100755 index cc6eea1f26..0000000000 --- a/Library/Homebrew/shims/ruby/bundle +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# Insert our system Ruby patch script, if neeeded. -# Fixes universal-ruby getting confused whether to install arm64 or x86_64 macOS versions. -# https://github.com/rubygems/rubygems/issues/4234 -if RUBY_PLATFORM.match?(/universal\..*-darwin/) - rubylib = File.expand_path("../../rubyext", File.dirname(__FILE__)) - ENV["RUBYLIB"] = rubylib - $LOAD_PATH.unshift(rubylib) unless $LOAD_PATH.include?(rubylib) - require "rubygems/defaults/operating_system" if defined?(Gem) # Reload if already loaded. -end - -require "rubygems" -load Gem.activate_bin_path("bundler", "bundle", ">= 0.a") diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index 2b5c7e5a2d..320a8ba4a5 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -10,7 +10,7 @@ require "English" module Homebrew # Keep in sync with the `Gemfile.lock`'s BUNDLED WITH. # After updating this, run `brew vendor-gems --update=--bundler`. - HOMEBREW_BUNDLER_VERSION = "2.3.24" + HOMEBREW_BUNDLER_VERSION = "2.3.26" module_function @@ -64,7 +64,6 @@ module Homebrew paths = ENV.fetch("PATH").split(":") paths.unshift(ruby_bindir) unless paths.include?(ruby_bindir) paths.unshift(Gem.bindir) unless paths.include?(Gem.bindir) - paths.unshift(HOMEBREW_LIBRARY_PATH/"shims/ruby") unless paths.include?(HOMEBREW_LIBRARY_PATH/"shims/ruby") ENV["PATH"] = paths.compact.join(":") # Set envs so the above binaries can be invoked.