diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-12-23 08:45:19 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-12-23 10:17:41 +0900 |
commit | 339227363ce0cf967fa17efa4489d823932ddabd (patch) | |
tree | 576482ce00d03439f2dbf4714a6f309293884c2f /lib/bundler/spec_set.rb | |
parent | 733ed1e18498f97250b788f169c37b170e0cf2b6 (diff) |
Merge RubyGems 3.2.3 and Bundler 2.2.3
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3982
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r-- | lib/bundler/spec_set.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index aef854ce0c..a0b9552c18 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -22,10 +22,11 @@ module Bundler break unless dep = deps.shift next if !handled.add?(dep) || skip.include?(dep.name) - if spec = spec_for_dependency(dep, match_current_platform) - specs << spec + specs_for_dep = spec_for_dependency(dep, match_current_platform) + if specs_for_dep.any? + specs += specs_for_dep - spec.dependencies.each do |d| + specs_for_dep.first.dependencies.each do |d| next if d.type == :development d = DepProxy.new(d, dep.__platform) unless match_current_platform deps << d @@ -184,11 +185,7 @@ module Bundler def spec_for_dependency(dep, match_current_platform) specs_for_platforms = lookup[dep.name] if match_current_platform - Bundler.rubygems.platforms.reverse_each do |pl| - match = GemHelpers.select_best_platform_match(specs_for_platforms, pl) - return match if match - end - nil + GemHelpers.select_best_platform_match(specs_for_platforms, Bundler.local_platform) else GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform) end |