Project

General

Profile

« Previous | Next » 

Revision 98c84ef4

Added by mdalessio (Mike Dalessio) over 1 year ago

[rubygems/rubygems] Excluding local platform from lockfile should not affect musl vs gnu case

This case is for not locking things like arm-darwin-23 when the
lockfile already includes arm-darwin, so that we don't infinitely keep
redundant versioned platforms in the lockfile when not necessary.

We detect this with Gem::Platform#===. For example,
Gem::Platform.new("arm-darwin-23") === Gem::Platform.new("arm-darwin")
but they're not ==.

However, in the case of -musl vs -gnu, those act as the platform
"version", but === is not commutative for them. This is explained in
=== docs.

We only want to exclude the local platform in situations when
Gem::Platform#=== is actually commutative.

https://github.com/rubygems/rubygems/commit/8099c4face