1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Refactor materialization conditions

https://github.com/rubygems/rubygems/commit/08e1554fb6
This commit is contained in:
David Rodríguez 2022-07-23 20:56:17 +02:00 committed by git
parent ed9bbfd759
commit 35e508d13e

View file

@ -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|