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

Optimization: Use match? instead of match #7003

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

DecimalTurn
Copy link
Contributor

Description

This PR replaces instances of .match with .match? in heuristics.rb.
This change should have a small performance improvement as discussed here.

I also removed the double-negation inside And.match? to improve readability.

Checklist:

N/A

@DecimalTurn DecimalTurn requested a review from a team as a code owner August 20, 2024 20:15
Copy link
Collaborator

@Alhadis Alhadis left a comment

Choose a reason for hiding this comment

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

I vaguely recall using this method some time ago, but it triggered test failures in an outdated version of Ruby that I assume we've dropped support for.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Thanks.

Note: this PR will not be merged until close to when the next release is made. See here for more details.

@lildude lildude added this pull request to the merge queue Aug 29, 2024
Merged via the queue into github-linguist:master with commit 2271f6c Aug 29, 2024
5 checks passed
@DecimalTurn DecimalTurn deleted the matches branch August 29, 2024 15:18
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants