summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-07-04 18:37:59 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-10-18 16:33:15 +0900
commitb99010f9f2aa9e8ea100f4cdbe1e2f1a5601fd5e (patch)
tree0902aee65cd32679c6c0cc6e616788863d383714 /lib/bundler/definition.rb
parent71dede387e089023292e66c7f39305e13400c8c0 (diff)
[rubygems/rubygems] Use `flat_map`
https://github.com/rubygems/rubygems/commit/b31308fb4c
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6578
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 340b1b68dd..374462ab49 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -792,12 +792,10 @@ module Bundler
end
def expand_dependencies(dependencies)
- deps = []
- dependencies.each do |dep|
+ dependencies.flat_map do |dep|
target_platforms = dep.gem_platforms(@platforms)
- deps += expand_dependency_with_platforms(dep, target_platforms)
+ expand_dependency_with_platforms(dep, target_platforms)
end
- deps
end
def expand_dependency_with_platforms(dep, platforms)