From bd88cffd8cced676353716a7e5b1b753f65c256c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 11 Nov 2024 19:09:29 +0100 Subject: [PATCH] [rubygems/rubygems] Test with Ruby 3.4 https://github.com/rubygems/rubygems/commit/23d06195fa --- lib/bundler/process_lock.rb | 2 +- lib/bundler/rubygems_ext.rb | 2 +- spec/bundler/runtime/setup_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bundler/process_lock.rb b/lib/bundler/process_lock.rb index 36bb5f768d..784b17e363 100644 --- a/lib/bundler/process_lock.rb +++ b/lib/bundler/process_lock.rb @@ -6,7 +6,7 @@ module Bundler lock_file_path = File.join(bundle_path, "bundler.lock") base_lock_file_path = lock_file_path.delete_suffix(".lock") - require "fileutils" if Bundler.rubygems.provides?("< 3.5.23") + require "fileutils" if Bundler.rubygems.provides?("< 3.6.0") begin SharedHelpers.filesystem_access(lock_file_path, :write) do diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 2cb18e901f..6697653485 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -442,7 +442,7 @@ module Gem end end - unless Gem.rubygems_version >= Gem::Version.new("3.5.23") + if Gem.rubygems_version < Gem::Version.new("3.6.0") class Package; end require "rubygems/package/tar_reader" require "rubygems/package/tar_reader/entry" diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 706f352ec5..106f1edc57 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1554,7 +1554,7 @@ end RUBY expect(last_command.stdboth).not_to include "FAIL" - expect(err).to include "private method `gem'" + expect(err).to match(/private method [`']gem'/) end it "keeps Kernel#require private" do