Skip to content

Conversation

@RobinDaugherty
Copy link
Contributor

JRuby 1.7.x does not have a Module#prepend method. #457 made the assumption that if Ruby version is 2.0 or higher, then the prepend method 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 prepend method by using the pre-Ruby 2.0 method (inserting OldDebugExceptionsCatcher), and it seems to work correctly. But it may not be the correct behavior.

@nateberkopec
Copy link
Contributor

Can you rebase this against the latest travis.yml?

.travis.yml Outdated
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails41.gemfile
Copy link
Contributor

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.

@RobinDaugherty
Copy link
Contributor Author

LoadError: no such file to load -- raven
Does that failure mean anything to you? I get the feeling that it's not related to a change that I made.

@nateberkopec
Copy link
Contributor

Heh, no, I was hoping you would know 😆

@RobinDaugherty
Copy link
Contributor Author

Doh! It makes sense...the gemfile doesn't exist, so raven doesn't exist in the bundle.

@siegy22
Copy link
Contributor

siegy22 commented Mar 18, 2016

Wow, thanks for the fix, didn't know that something like JRuby 1.7 in 2.0 mode exists..
(I was the one who made the fix for the Module#prepend stuff)
Good work!

@RobinDaugherty
Copy link
Contributor Author

Thanks @Elektron1c97. I hate to admit that the reason I know about it is that I'm using it in production!

@nateberkopec
Copy link
Contributor

Merged in a462449

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.

3 participants