From a55a2fc6e8215b08b6a6ed72f0ed2cd83cd8f6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 31 Jan 2025 20:14:52 +0100 Subject: [PATCH] [rubygems/rubygems] Reset existing specs when using `Bundler::SpecSet#[]=` We have a flaky failure where to equal Bundler specs sneak into the same SpecSet. This seems like a vector where that could happen so trying this in case it fixes the flaky. https://github.com/rubygems/rubygems/commit/a33aeb3c4d --- lib/bundler/spec_set.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 69dee36145..8d75c29420 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -83,6 +83,8 @@ module Bundler end def []=(key, value) + delete_by_name(key) + add_spec(value) end