Skip to content

Commit

Permalink
Remove unnecessary nil checks
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Dec 1, 2021
1 parent 8360ad0 commit d047b89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bundler/lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
@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
Expand Down

0 comments on commit d047b89

Please sign in to comment.