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 raise exception on JRuby 9k < 9.2.1.0 #400
Conversation
79a65ee
to
1545444
Compare
require 'ripper' | ||
begin | ||
# It doesn't matter if MRI compatibility is < 2. | ||
Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0") || |
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.
👋 You can't use Gem::Version
within RSpec as we disable rubygems, I suspect this is why the build is failing. String comparison works fine for our purposes.
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.
Thanks! I'd already switched to string comparison before I saw your message, but it's good to know what went wrong.
JRuby 9k 9.2.0.0 and lower will has a bug in Ripper.sexp that raises a NoMethodError when analyzing code that even references a method with keyword arguments. This makes failure formatting raise that exception. Best to just not use Ripper on JRuby 9k < 9.2.1.0. [Fixes rspec#399]
1545444
to
39de8fb
Compare
Thanks! |
Don't raise exception on JRuby 9k < 9.2.1.0
…/fixes_399 Don't raise exception on JRuby 9k < 9.2.1.0 --- This commit was imported from rspec/rspec-support@d60a44d.
This commit was imported from rspec/rspec-support@fc45672.
JRuby 9k 9.2.0.0 and lower will has a bug in Ripper.sexp that raises a
NoMethodError when analyzing code that even references a method with
keyword arguments. This makes failure formatting raise that exception.
Best to just not use Ripper on JRuby 9k < 9.2.1.0.
[Fixes #399]