-
-
Notifications
You must be signed in to change notification settings - Fork 921
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
Error running rubocop with JRuby 9.4.0.0 #7520
Comments
This has been reported earlier as rubocop/rubocop#11214 |
Looking into it now! |
The issue probably stems from this code in variable_force.rb and the symbol proc created at this point gets damaged further down the call stack somehow. def process_rescue(node)
resbody_nodes = node.each_child_node(:resbody)
contain_retry = resbody_nodes.any? do |resbody_node|
resbody_node.each_descendant.any?(&:retry_type?)
end
# Treat begin..rescue..end with retry as a loop.
process_loop(node) if contain_retry
end |
This appears to work correctly on master (9.4.1):
Same result with forced compilation and indy enabled. @enebo Perhaps something you fixed recently? |
There was another issue reported against rubocop but this looks different. A bunch of things have been fixed (this could be an enumerable fix, kwarg fixes or even one of several ripper fixes) in the last week and I do not want to bisect what fixed this issue but it appears to be fixed at least. |
Environment Information
jruby 9.4.0.0 (3.1.0) 2022-11-23 95c0ec1 OpenJDK 64-Bit Server VM 17.0.5+8 on 17.0.5+8 +jit [x86_64-darwin]
Darwin messerschmitt 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64
rubocop 1.40.0 (using Parser 3.1.3.0, rubocop-ast 1.24.0, running on jruby 3.1.0) [java]
Expected Behavior
Given a ruby file
example.rb
running
should complete with some rubocop offenses. This works fine with JRuby 9.3.9.0 and Ruby 3.1.3:
Actual Behavior
With JRuby 9.4.0.0 there is an error:
The text was updated successfully, but these errors were encountered: