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

Ruby core classes mostly force == and != to true/false #7

Open
taw opened this issue Feb 4, 2018 · 3 comments
Open

Ruby core classes mostly force == and != to true/false #7

taw opened this issue Feb 4, 2018 · 3 comments

Comments

@taw
Copy link
Owner

taw commented Feb 4, 2018

So we need to override ==/!= on TrueClass, FalseClass, Float, Integer, Rational, etc.

This could cause performance issues, but the alternative is a lot of brokenness. Perhaps we need a bit of C to improve performance here.

This used to sort of work, but not in any consistent way.

@taw
Copy link
Owner Author

taw commented Jul 23, 2018

This is done now, it still doesn't quite handle all cases (specs have the failing cases).

@Unihedro
Copy link
Contributor

Btw how do you plan on handling .eql? and .equal?

@taw
Copy link
Owner Author

taw commented Dec 29, 2018

That would be mainly useful for keying by Z3 AST object?

I think this should already work, since they're all immutable and Z3 interns them, so actually same object should be returned for anything identical.

Z3 objects shouldn't .eql? or .equal? anything else, so I do't think we need to override anything.

(unless I'm missing something)

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

No branches or pull requests

2 participants