diff options
Diffstat (limited to 'lib/bundler/index.rb')
-rw-r--r-- | lib/bundler/index.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index f0ee411df8..870315e0e0 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -163,11 +163,9 @@ module Bundler specs += base if base found = specs.select do |spec| next true if spec.source.is_a?(Source::Gemspec) - if base # allow all platforms when searching from a lockfile - dependency.matches_spec?(spec) - else - dependency.matches_spec?(spec) && Gem::Platform.match(spec.platform) - end + next false unless dependency.matches_spec?(spec) + next true if base # allow all platforms when searching from a lockfile + Gem::Platform.match(spec.platform) # otherwise, the platform must also match end wants_prerelease = dependency.requirement.prerelease? |