Skip to content

Commit

Permalink
[rubygems/rubygems] Remove now unnecessary parameter to `expand_depen…
Browse files Browse the repository at this point in the history
…dencies`

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

rubygems/rubygems@99c144fbe3
  • Loading branch information
deivid-rodriguez authored and hsbt committed Oct 18, 2022
1 parent 8c4bd1e commit cef7f6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/bundler/definition.rb
Expand Up @@ -479,7 +479,7 @@ def resolver
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)
Expand Down Expand Up @@ -791,11 +791,10 @@ def metadata_dependencies
]
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
Expand Down

0 comments on commit cef7f6b

Please sign in to comment.