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

Valkyrie::ID#eql? and == should return true when a string is compared with an equivalent Valkyrie::ID #662

Closed
hackartisan opened this issue Jan 31, 2019 · 3 comments
Assignees

Comments

@hackartisan
Copy link
Contributor

hackartisan commented Jan 31, 2019

We would like all 3 examples to return true. === should continue to return false.

[11] pry(main)> id = Valkyrie::ID.new('abc')
=> #<Valkyrie::ID:0x007fdee25d4760 @id="abc">
[12] pry(main)> id.eql?('abc')
=> false
[13] pry(main)> id == 'abc'
=> false
[14] pry(main)> id == Valkyrie::ID.new('abc')
=> true
@tpendragon
Copy link
Collaborator

I didn't do this on purpose for some reason and now I don't remember why, so okay.

@no-reply
Copy link
Contributor

Related to #765

@no-reply
Copy link
Contributor

Happy to implement this, if there's broad agreement it's desirable.

It's probably a major version, once in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants