Skip to content

Use ActiveSupport try pattern #2537

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

Merged

Conversation

ericproulx
Copy link
Contributor

This PR introduces try in the codebase. We had several cases of if obj.respond_to?(<name>) && obj.and I think usingtry` is more readable.

@ericproulx ericproulx marked this pull request as ready for review February 16, 2025 17:21
@ericproulx ericproulx requested a review from dblock February 16, 2025 17:21
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

I like it a lot!

@dblock dblock merged commit 48ebc25 into ruby-grape:master Feb 18, 2025
63 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.

2 participants