Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08e1554

Browse files
Refactor materialization conditions
1 parent 8f922d9 commit 08e1554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bundler/lib/bundler/lazy_specification.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ def __materialize__(platform)
9191
@specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name
9292
source.gemspec.tap {|s| s.source = source }
9393
else
94-
search_object = if source.is_a?(Source::Path)
94+
search_object = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
9595
Dependency.new(name, version)
9696
else
97-
ruby_platform_materializes_to_ruby_platform? ? self : Dependency.new(name, version)
97+
self
9898
end
9999
candidates = source.specs.search(search_object)
100100
same_platform_candidates = candidates.select do |spec|

0 commit comments

Comments
 (0)