summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-07-23 20:56:17 +0200
committergit <svn-admin@ruby-lang.org>2022-08-02 16:10:14 +0900
commit35e508d13e6d936af7725ccf9ac15deb69e35257 (patch)
tree8a2a59607e334ff7d9e5130b59304ea6179d237e /lib
parented9bbfd7594f655702461067e3dc8106eec52385 (diff)
[rubygems/rubygems] Refactor materialization conditions
https://github.com/rubygems/rubygems/commit/08e1554fb6
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/lazy_specification.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index ff9444e009..fdf37fd7a4 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -91,10 +91,10 @@ module Bundler
@specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name
source.gemspec.tap {|s| s.source = source }
else
- search_object = if source.is_a?(Source::Path)
+ search_object = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
Dependency.new(name, version)
else
- ruby_platform_materializes_to_ruby_platform? ? self : Dependency.new(name, version)
+ self
end
candidates = source.specs.search(search_object)
same_platform_candidates = candidates.select do |spec|