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

No Parser::Source::Range#eql? #670

Closed
marcandre opened this issue Apr 10, 2020 · 2 comments
Closed

No Parser::Source::Range#eql? #670

marcandre opened this issue Apr 10, 2020 · 2 comments

Comments

@marcandre
Copy link
Contributor

marcandre commented Apr 10, 2020

I hesitated opening this as it's super minor, but is it intentional that there is no Parser::Source::Range#eql? (and #hash)?

This prevents using Ranges as meaningful hash keys or when conditions.

I noticed this when wondering if RuboCop should optimize this O(n^2) algorithm although it would probably be completely negligible in that case compared to the actual policing...

I'd gladly provide a PR if desired.

@iliabylich
Copy link
Collaborator

Sorry, I missed this issue initially. Yes, it makes sense to me. Feel free to send a RP if you still need it.

@marcandre marcandre changed the title No Parser::Source::Location#eql? No Parser::Source::Range#eql? Apr 14, 2020
marcandre added a commit to marcandre/parser that referenced this issue Apr 14, 2020
marcandre added a commit to marcandre/parser that referenced this issue Apr 14, 2020
@iliabylich
Copy link
Collaborator

implemented in #675

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