From d0b89cab4ed7661cc0acea28ec04793f19ce3953 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 14 Oct 2025 15:20:51 +0900 Subject: [PATCH] [rubygems/rubygems] Added example for legacy windows platform https://github.com/rubygems/rubygems/commit/90130c0648 --- spec/bundler/other/major_deprecation_spec.rb | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index f61dc1bc88..d701c4008d 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -573,6 +573,38 @@ RSpec.describe "major deprecations" do end end + context "bundle install with a lockfile including X64_MINGW_LEGACY platform" do + before do + gemfile <<~G + source "https://gem.repo1" + gem "rake" + G + + lockfile <<~L + GEM + remote: https://rubygems.org/ + specs: + rake (10.3.2) + + PLATFORMS + ruby + x64-mingw32 + + DEPENDENCIES + rake + + BUNDLED WITH + #{Bundler::VERSION} + L + end + + it "raises a helpful error" do + bundle "install", raise_on_error: false + + expect(err).to include("Found x64-mingw32 in lockfile, which is no longer supported as of Bundler 4.0.") + end + end + context "when Bundler.setup is run in a ruby script" do before do create_file "gems.rb", "source 'https://gem.repo1'"