[rubygems/rubygems] Return nil to clarify return value is ignored

https://github.com/rubygems/rubygems/commit/8702f59d32
This commit is contained in:
David Rodríguez 2019-01-10 16:08:59 +00:00 committed by Hiroshi SHIBATA
parent 5998012a0c
commit c78839902b
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -47,7 +47,7 @@ To install the missing version, run `gem install bundler:#{vr.first}`
specs.reject! { |spec| spec.version.segments.first != bundler_version.segments.first }
exact_match_index = specs.find_index { |spec| spec.version == bundler_version }
return specs unless exact_match_index
return unless exact_match_index
specs.unshift(specs.delete_at(exact_match_index))
end