Skip to content

Commit

Permalink
Merge pull request #18598 from khipp/fix-bundle-version-comparison
Browse files Browse the repository at this point in the history
Fix `BundleVersion` comparison when `short_version` is not comparable
  • Loading branch information
MikeMcQuaid authored Oct 21, 2024
2 parents 4ca57e2 + 773242b commit a74bdb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/Homebrew/bundle_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def <=>(other)
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
Expand Down

0 comments on commit a74bdb2

Please sign in to comment.