Skip to content

Conversation

@smortex
Copy link
Contributor

@smortex smortex commented Mar 19, 2016

Quoting Object#eql?

For objects of class Object, eql? is synonymous with ==. Subclasses normally continue this tradition by aliasing eql? to their overridden == method

smortex added 2 commits March 19, 2016 11:30
~~~
IPAddress.parse('::1') == IPAddress.parse('::1')   #=> true
IPAddress.parse('::1').eql? IPAddress.parse('::1') #=> false
~~~
~~~
IPAddress.parse('::1') == IPAddress.parse('::1')   #=> true
IPAddress.parse('::1').eql? IPAddress.parse('::1') #=> true
~~~
@smortex
Copy link
Contributor Author

smortex commented Sep 1, 2017

For the records, #22 also partially handles this by defining methods (and does more) but no news from submitter.

Either I missed that other PR when opening this one, or I wanted to follow more strictly the "tradition" by aliasing 😉

@Adam21e Adam21e requested review from Adam21e and removed request for francisluong August 10, 2020 04:57
Copy link

@Adam21e Adam21e left a comment

Choose a reason for hiding this comment

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

looks good and is handy to have.

@grosser
Copy link

grosser commented Jan 7, 2022

@kaoudis can this get merged ?

@smortex
Copy link
Contributor Author

smortex commented Jan 7, 2022

@Adam21e I can not merge this, maybe you can? Cc @bluemonk

@bluemonk bluemonk merged commit 8ff186b into ipaddress-gem:master Jan 8, 2022
@grosser
Copy link

grosser commented Jan 8, 2022 via email

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.

4 participants