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

Fix Grape::Endpoint's inspect method when not called in the context of an API #2492

Merged
merged 6 commits into from
Sep 1, 2024

Conversation

ericproulx
Copy link
Contributor

Fix #2491

@ericproulx ericproulx marked this pull request as ready for review September 1, 2024 11:50
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.

Some nits, thanks!

Is there a test one/you could write that gets us closer to the usage in the bug it fixes?

CHANGELOG.md Outdated Show resolved Hide resolved
lib/grape/endpoint.rb Outdated Show resolved Hide resolved
lib/grape/endpoint.rb Outdated Show resolved Hide resolved
lib/grape/endpoint.rb Outdated Show resolved Hide resolved
def inspect
return super unless env

"#{self.class} in `#{route.origin}' endpoint"
Copy link
Member

Choose a reason for hiding this comment

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

Was this meant to be quoted differently?

Suggested change
"#{self.class} in `#{route.origin}' endpoint"
"#{self.class} in '#{route.origin}' endpoint"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://bugs.ruby-lang.org/issues/16495
Looks like something cultural

@ericproulx
Copy link
Contributor Author

Some nits, thanks!

Is there a test one/you could write that gets us closer to the usage in the bug it fixes?

I've added a test that calls inspect on a Endpoint instance not related to an API call.

@dblock dblock merged commit 1cf4a80 into ruby-grape:master Sep 1, 2024
56 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
2 participants