[rubygems/rubygems] Make stub sorting stable

https://github.com/rubygems/rubygems/commit/6b70e9043d
This commit is contained in:
David Rodríguez 2024-05-30 11:38:21 +02:00 committed by git
parent 5668933296
commit f4f56b23c3

View File

@ -830,7 +830,9 @@ class Gem::Specification < Gem::BasicSpecification
next names if names.nonzero?
versions = b.version <=> a.version
next versions if versions.nonzero?
Gem::Platform.sort_priority(b.platform)
platforms = Gem::Platform.sort_priority(b.platform) <=> Gem::Platform.sort_priority(a.platform)
next platforms if platforms.nonzero?
b.base_dir == Gem.path.first ? 1 : -1
end
end