[前][次][番号順一覧][スレッド一覧]

ruby-changes:70043

From: David <ko1@a...>
Date: Fri, 3 Dec 2021 20:01:13 +0900 (JST)
Subject: [ruby-changes:70043] 0073f624f0 (master): [rubygems/rubygems] Don't unnecessarily loop twice through dependencies

https://git.ruby-lang.org/ruby.git/commit/?id=0073f624f0

From 0073f624f0a89f454f935940a5140f6ff73280f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 17 Nov 2021 15:26:06 +0100
Subject: [rubygems/rubygems] Don't unnecessarily loop twice through
 dependencies

https://github.com/rubygems/rubygems/commit/06b4a7994d
---
 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 2ac05d606f9..c2a8e2ba42f 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -634,15 +634,13 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L634
     end
 
     def converge_dependencies
+      changes = false
+
       @dependencies.each do |dep|
         if dep.source
           dep.source = sources.get(dep.source)
         end
-      end
 
-      changes = false
-
-      @dependencies.each do |dep|
         unless locked_dep = @locked_deps[dep.name]
           changes = true
           next
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]