Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparable and spaceship operator behavior changing #784

ryanatball opened this issue May 3, 2018 · 0 comments

Comparable and spaceship operator behavior changing #784

ryanatball opened this issue May 3, 2018 · 0 comments


Copy link

@ryanatball ryanatball commented May 3, 2018

If Comparable is included then <=> is used for comparisons. Currently ruby eats any exceptions thrown by <=> but this is changing in the future and it outputs warnings like this.

warning: Comparable#== will no more rescue exceptions of # in the next release.
warning: Return nil in # if the comparison is inappropriate or avoid such comparison.

Related Ruby bug report:

The <=> operator in structure_item.rb and json_rpc.rb should be updated to ensure that they don't raise exceptions for cases such as comparing against nil or with objects that don't support an expected method.

ryanatball added a commit that referenced this issue May 16, 2018
closes #784 update spaceship operators exception behavior
@ryanatball ryanatball added this to the v4.2.4 milestone May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant