diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-12-22 18:58:55 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-01-11 13:51:52 +0900 |
commit | 7f0dbfc9c80777b0f189bdaf1b2f70f309ddab31 (patch) | |
tree | 501bd001b0e9f18f81e6c7afc97af4f8ca4ed399 /lib/bundler/spec_set.rb | |
parent | 51d2a8e983ddc25e2333706f0fc6f1c01e12fa06 (diff) |
[rubygems/rubygems] Move resetting the spec set to where it becomes necessary
https://github.com/rubygems/rubygems/commit/a8b547c6b1
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r-- | lib/bundler/spec_set.rb | 10 |
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 |