Skip to content

Use Module#prepend instead of alias_chaining for rails exceptions #31

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
merged 1 commit into from
Jun 6, 2017

Conversation

djgould
Copy link
Contributor

@djgould djgould commented Nov 15, 2016

Currently alias chaining is used by this gem to tie in to exceptions. This method is now deprecated and it is suggested to use Module#prepend.

This is especially an issue because if another gem Module#prepends onto the same method that is being alias chained it causes an infinite loop and a stack level too deep error. This behavior is talked about here. I was experiencing this exact issue with sentry-raven and based my solution on the one used by sentry-raven

This fix should be backwards compatible with any ruby versions that don't support Module#prepend

alias chaining causes an infinite loop when other gems use Module#prepend
@dmke dmke merged commit 932845c into InfluxCommunity:master Jun 6, 2017
@dmke
Copy link
Collaborator

dmke commented Jun 6, 2017

Sorry for the delay. I'm in the process of merging this now.

@dmke
Copy link
Collaborator

dmke commented Jun 6, 2017

This is now included in version 0.1.12.

Thank you for your contribution!

@dmke dmke mentioned this pull request Feb 14, 2018
5 tasks
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