1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Remove unnecessary local variable

a997210473
This commit is contained in:
David Rodríguez 2022-07-29 22:39:38 +02:00 committed by git
parent 5487e76374
commit 8c98f7be57

View file

@ -96,12 +96,11 @@ module Bundler
else
source.specs.search(self)
end
best_installable_candidate = candidates.reverse.find do |spec|
search = candidates.reverse.find do |spec|
spec.is_a?(StubSpecification) ||
(spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version))
end
search = best_installable_candidate || candidates.last
end || candidates.last
search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
search
end