diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-11-17 09:19:03 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-03 20:00:47 +0900 |
commit | 906b95780fa7f9ff23a2d724d25fd4f69d494543 (patch) | |
tree | 3de2cf28d7f60b9d3f4fb03d94375b3f6fbcd219 | |
parent | e4c7c5468e01125cf10b06e7db1006b64bf1cd7e (diff) | |
download | ruby-906b95780fa7f9ff23a2d724d25fd4f69d494543.tar.gz |
[rubygems/rubygems] Remove unnecessary nil checks
https://github.com/rubygems/rubygems/commit/d047b8935d
-rw-r--r-- | lib/bundler/definition.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index c74bb66c8f..97e795a9b9 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -405,8 +405,8 @@ module Bundler @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 |