summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-12-22 18:58:55 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-01-11 13:51:52 +0900
commit7f0dbfc9c80777b0f189bdaf1b2f70f309ddab31 (patch)
tree501bd001b0e9f18f81e6c7afc97af4f8ca4ed399
parent51d2a8e983ddc25e2333706f0fc6f1c01e12fa06 (diff)
[rubygems/rubygems] Move resetting the spec set to where it becomes necessary
https://github.com/rubygems/rubygems/commit/a8b547c6b1
-rw-r--r--lib/bundler/spec_set.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index d241842c37..04a1fac2ba 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -68,8 +68,6 @@ module Bundler
less_specific_platform = new_platforms.find {|platform| platform != Gem::Platform::RUBY && platform === Bundler.local_platform }
platforms.delete(Bundler.local_platform) if less_specific_platform
- reset!
-
platforms
end
@@ -209,14 +207,18 @@ module Bundler
end
if platform_spec
- new_specs << LazySpecification.from_spec(platform_spec)
+ new_specs << LazySpecification.from_spec(platform_spec) unless specs.include?(platform_spec)
true
else
false
end
end
- @specs.concat(new_specs.uniq) if valid_platform
+ if valid_platform && new_specs.any?
+ @specs.concat(new_specs)
+
+ reset!
+ end
valid_platform
end