Skip to content
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

Make parse from Ruby 1.9 to 2.3 available #233

Merged

Conversation

koic
Copy link
Member

@koic koic commented May 13, 2022

RuboCop can analyze Ruby 1.9 or later. But now it turns out that RuboCop hasn't been able to parse older Ruby versions.
https://docs.rubocop.org/rubocop/1.29/compatibility.html#support-matrix

Analysis Ruby code and runtime Ruby versions are different. So, only runtime version should have been dropped.

This PR makes it possible to parse older Ruby versions that were accidentally dropped before RuboCop AST was separated from RuboCop core.

With this fix, the following recovery work will be possible.

RuboCop can analyze Ruby 1.9 or later. But now it turns out that RuboCop
hasn't been able to parse older Ruby versions.
https://docs.rubocop.org/rubocop/1.29/compatibility.html#support-matrix

Analysis Ruby code and runtime Ruby versions are different.
So, only runtime version should have been dropped.

This PR makes it possible to parse older Ruby versions that were
accidentally dropped before RuboCop AST was separated from RuboCop core.

With this fix, the following recovery work will be possible.

- Recover for Ruby 2.5 analysis: rubocop/rubocop#10626
- Recover for Ruby 2.4 analysis: rubocop/rubocop#10632
@marcandre marcandre merged commit 1fac542 into rubocop:master May 13, 2022
@marcandre
Copy link
Contributor

Good point, thanks

@marcandre
Copy link
Contributor

Release 1.18.0

@koic koic deleted the new_make_parse_from_ruby_19_to_23_available branch May 13, 2022 17:14
koic added a commit to koic/rubocop that referenced this pull request May 16, 2022
Follow up rubocop#10632 (comment).

Reverts part of rubocop#7869 and rubocop#8056.

Only the Ruby version (2.3) to runtime should have been dropped, not
code analysis.
This PR makes Ruby 2.3 code analysis with `TargetRubyVersion: 2.3`.
It aims to solve essentially the same problem as rubocop#10626 and 10632.

And this change requires RuboCop AST 1.18 or later:
rubocop/rubocop-ast#233
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