Merge pull request #18598 from khipp/fix-bundle-version-comparison

Fix `BundleVersion` comparison when `short_version` is not comparable
This commit is contained in:
Mike McQuaid 2024-10-21 16:47:10 +01:00 committed by GitHub
commit a74bdb271c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,9 @@ module Homebrew
short_version = self.short_version.then(&make_version)
other_short_version = other.short_version.then(&make_version)
return short_version <=> other_short_version
short_version_difference = short_version <=> other_short_version
return short_version_difference unless short_version_difference.nil?
end
difference