diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-04-28 10:28:31 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-05-04 06:45:15 +0900 |
commit | 2cf4318645f81fb13f6b264369bcfe6fbd4e91b9 (patch) | |
tree | 5663180c9f594156eb83974cd324f76316db1268 /lib | |
parent | ba4ec45cf156932a5a63cd9597aa210760f4390f (diff) | |
download | ruby-2cf4318645f81fb13f6b264369bcfe6fbd4e91b9.tar.gz |
[rubygems/rubygems] Make looping more concise with `select`
https://github.com/rubygems/rubygems/commit/c43d5f979a
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/definition.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 8877d2661e..602893c62a 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -680,13 +680,10 @@ module Bundler end def converge_specs(specs) - deps = [] converged = [] - @dependencies.each do |dep| - if specs[dep].any? {|s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) } - deps << dep - end + deps = @dependencies.select do |dep| + specs[dep].any? {|s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) } end specs.each do |s| |