diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-07-29 22:39:38 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-08-02 16:10:17 +0900 |
commit | 8c98f7be577389f01a90c7a39d693173d432e9e2 (patch) | |
tree | 002b6e08cd87a87f1c1dd8fa2a6ce36ca5d7605f /lib/bundler/lazy_specification.rb | |
parent | 5487e76374c5ee247b0f5a2867a6dc1319d98e0e (diff) |
[rubygems/rubygems] Remove unnecessary local variable
https://github.com/rubygems/rubygems/commit/a997210473
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 7245692546..05925e3e79 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -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 |