-
-
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
Don't cache Class.instance_methods
#2328
Conversation
743eec6
to
2f4a462
Compare
Care to add a test for this? Could be an integration test that adds a method to |
2f4a462
to
eb57e56
Compare
Done. |
Test looks good. CHANGELOG needed, danger is about to complain. |
b5c6f79
to
432d36c
Compare
Done. |
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.
Danger is nitpicky, sorry :)
432d36c
to
4c30e8d
Compare
Done. |
4c30e8d
to
fa06395
Compare
CHANGELOG.md
Outdated
@@ -7,6 +7,7 @@ | |||
|
|||
#### Fixes | |||
|
|||
* [#2328](https://github.com/ruby-grape/grape/pull/2328): Don't cache Class.instance_methods - [@byroot](https://github.com/byroot). |
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.
🤦 there's an extra space in front of *
SORRY, we'll get there
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.
No worries, that's on me for doing these silly mistakes.
Fix: ruby-grape#2258 Some gems or app code may define methods on `Class` after `grape` is loaaded but before `override_all_methods!` is called. As such it's better to check `Class.method_defined?` when doing the override.
fa06395
to
4f27305
Compare
Done. |
Merged, thanks for hanging in here with me! |
Fix: #2258
Some gems or app code may define methods on
Class
aftergrape
is loaaded but beforeoverride_all_methods!
is called.As such it's better to check
Class.method_defined?
when doing the override.