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

Use regex block instead of if #2383

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

ericproulx
Copy link
Contributor

Since ruby 2.6, the Regex's match function comes with a block that will be executed only if match succeed. This PR is just a small refactor

@ericproulx ericproulx requested a review from dnesteryuk December 9, 2023 10:52
@grape-bot
Copy link

grape-bot commented Dec 9, 2023

1 Warning
⚠️ There're library changes, but not tests. That's OK as long as you're refactoring existing code.

Generated by 🚫 Danger

@dblock dblock merged commit 0456797 into ruby-grape:master Dec 12, 2023
31 checks passed
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.

3 participants