-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
Calls super if env is not defined Add spec
There was a problem hiding this 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?
lib/grape/endpoint.rb
Outdated
def inspect | ||
return super unless env | ||
|
||
"#{self.class} in `#{route.origin}' endpoint" |
There was a problem hiding this comment.
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?
"#{self.class} in `#{route.origin}' endpoint" | |
"#{self.class} in '#{route.origin}' endpoint" |
There was a problem hiding this comment.
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
I've added a test that calls |
Fix #2491