summaryrefslogtreecommitdiff
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb13
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