Skip to content

Conversation

@marcandre
Copy link
Member

It compares only Sets. Other classes (in particular array) can not be compared and nil is returned.

The implementation of <, >, subset?, etc., could all depend on <=>, but it is more efficient to keep them as is. a < b can return false without having to know the reason (is it that a > b or do they both have distinct elements).

Copy link
Member

@knu knu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering Array has <=> yet is not Comparable, this looks reasonable.

@knu knu merged commit 4244fc1 into master Oct 24, 2020
@knu knu deleted the order branch October 24, 2020 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants