-
-
Notifications
You must be signed in to change notification settings - Fork 520
Use Module#prepend only when it exists #477
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
Conversation
Use duck typing instead of assuming that certain Ruby versions have specific capabilities.
|
Can you rebase this against the latest |
.travis.yml
Outdated
| include: | ||
| - rvm: jruby-1.7.24 | ||
| env: JRUBY_OPTS="--2.0" | ||
| gemfile: gemfiles/rails41.gemfile |
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 is no rails41.gemfile on latest master, these need to be omitted.
|
|
|
Heh, no, I was hoping you would know 😆 |
|
Doh! It makes sense...the gemfile doesn't exist, so raven doesn't exist in the bundle. |
|
Wow, thanks for the fix, didn't know that something like JRuby 1.7 in 2.0 mode exists.. |
|
Thanks @Elektron1c97. I hate to admit that the reason I know about it is that I'm using it in production! |
|
Merged in a462449 |
JRuby 1.7.x does not have a
Module#prependmethod. #457 made the assumption that if Ruby version is 2.0 or higher, then theprependmethod exists. This affected me because I'm using JRuby 1.7 in "2.0 mode".It's always better to use duck typing instead of assuming that a version of Ruby has specific methods.
I believe it's correct to treat a missing
prependmethod by using the pre-Ruby 2.0 method (insertingOldDebugExceptionsCatcher), and it seems to work correctly. But it may not be the correct behavior.