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

ruby-changes:70036

From: David <ko1@a...>
Date: Fri, 3 Dec 2021 20:01:10 +0900 (JST)
Subject: [ruby-changes:70036] 906b95780f (master): [rubygems/rubygems] Remove unnecessary nil checks

https://git.ruby-lang.org/ruby.git/commit/?id=906b95780f

From 906b95780fa7f9ff23a2d724d25fd4f69d494543 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 17 Nov 2021 09:19:03 +0100
Subject: [rubygems/rubygems] Remove unnecessary nil checks

https://github.com/rubygems/rubygems/commit/d047b8935d
---
 lib/bundler/definition.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index c74bb66c8fc..97e795a9b9d 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -405,8 +405,8 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L405
       @locked_deps.each  {|name, d| both_sources[name][1] = d.source }
 
       both_sources.each do |name, (dep, lock_source)|
-        next if lock_source.nil? || (dep && lock_source.can_lock?(dep))
-        gemfile_source_name = (dep && dep.source) || "no specified source"
+        next if lock_source.nil? || lock_source.can_lock?(dep)
+        gemfile_source_name = dep.source || "no specified source"
         lockfile_source_name = lock_source
         changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
       end
-- 
cgit v1.2.1


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

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