[rubygems/rubygems] Remove now unnecessary parameter to `expand_dependencies`

We just call it once for resolution, so we can simplify things.

https://github.com/rubygems/rubygems/commit/99c144fbe3
This commit is contained in:
David Rodríguez 2022-07-06 22:29:13 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель 8c4bd1e58d
Коммит cef7f6b224
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -479,7 +479,7 @@ module Bundler
end
def expanded_dependencies
@expanded_dependencies ||= expand_dependencies(dependencies + metadata_dependencies, true)
@expanded_dependencies ||= expand_dependencies(dependencies + metadata_dependencies)
end
def filter_specs(specs, deps)
@ -791,11 +791,10 @@ module Bundler
]
end
def expand_dependencies(dependencies, remote = false)
def expand_dependencies(dependencies)
deps = []
dependencies.each do |dep|
next unless remote || dep.current_platform?
target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
target_platforms = dep.gem_platforms(@platforms)
deps += expand_dependency_with_platforms(dep, target_platforms)
end
deps