diff options
author | David RodrÃguez <[email protected]> | 2022-09-07 23:01:03 +0200 |
---|---|---|
committer | git <[email protected]> | 2022-09-09 19:38:52 +0900 |
commit | b350053ae47dc4653ecb85f64360cf6eafba6323 () | |
tree | 7a4b35689f0e41e16b9a3c1b9e6c38df1d359a7a | |
parent | cfe10e482e0657195cadf01f0be72e11b7fb62b4 (diff) |
[rubygems/rubygems] Fix resolution on non-musl platforms
Gems without specific platform were being preferred over matching platform specific gems. https://.com/rubygems/rubygems/commit/37b95b9159
-rw-r--r-- | lib/rubygems/resolver.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_resolver.rb | 33 |
2 files changed, 34 insertions, 1 deletions
@@ -246,7 +246,7 @@ class Gem::Resolver sources.each do |source| groups[source]. - sort_by {|spec| [spec.version, Gem::Platform.local =~ spec.platform ? 1 : 0] }. map {|spec| ActivationRequest.new spec, dependency }. each {|activation_request| activation_requests << activation_request } end @@ -391,6 +391,39 @@ class TestGemResolver < Gem::TestCase end end def test_only_returns_spec_once a1 = util_spec "a", "1", "c" => "= 1" b1 = util_spec "b", "1", "c" => "= 1" |