diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-09-12 18:38:33 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-10-18 16:33:15 +0900 |
commit | 804ae4ea12d05e66aaa680feea83af587ac53745 (patch) | |
tree | dfc2bfad81b1085c6b38d569addc4c6bea03e4c0 /lib/bundler/resolver.rb | |
parent | 67de00053a26db9d976efa393d121479b5315f5e (diff) |
[rubygems/rubygems] Simplify SpecGroup creation
https://github.com/rubygems/rubygems/commit/788e46e152
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6578
Diffstat (limited to 'lib/bundler/resolver.rb')
-rw-r--r-- | lib/bundler/resolver.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index 104e149f6b..80ad39e896 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -136,15 +136,15 @@ module Bundler current_specs[current_platform] = select_best_platform_match(specs, current_platform) end - spec_group_ruby = SpecGroup.create_for(specs_by_platform, [Gem::Platform::RUBY], Gem::Platform::RUBY) - if spec_group_ruby + if specs_by_platform[Gem::Platform::RUBY].any? + spec_group_ruby = SpecGroup.create_for(specs_by_platform, [Gem::Platform::RUBY]) spec_group_ruby.force_ruby_platform = dependency.force_ruby_platform groups << spec_group_ruby end next groups if @resolving_only_for_ruby || dependency.force_ruby_platform - spec_group = SpecGroup.create_for(specs_by_platform, @platforms, platform) + spec_group = SpecGroup.create_for(specs_by_platform, @platforms) groups << spec_group groups |