ruby-changes:74087
From: David <ko1@a...>
Date: Tue, 18 Oct 2022 16:33:45 +0900 (JST)
Subject: [ruby-changes:74087] b99010f9f2 (master): [rubygems/rubygems] Use `flat_map`
https://git.ruby-lang.org/ruby.git/commit/?id=b99010f9f2 From b99010f9f2aa9e8ea100f4cdbe1e2f1a5601fd5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Mon, 4 Jul 2022 18:37:59 +0200 Subject: [rubygems/rubygems] Use `flat_map` https://github.com/rubygems/rubygems/commit/b31308fb4c --- lib/bundler/definition.rb | 6 ++---- 1 file 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 https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L792 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) -- cgit v1.2.3 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/