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

Fix incorrect required_ruby_version #985

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

Watson1978
Copy link
Contributor

This gem has used String#delete_suffix which was introduced at Ruby 2.5.

delimiter.delete_suffix(@end_delim).bytes.all? { |c| c == SPACE }

Ref. https://github.com/ruby/ruby/blob/ruby_2_5/NEWS

So, even Ruby 2.0 can be installed now, however it will not work.

This gem has used String#delete_suffix which was introduced at Ruby 2.5.
https://github.com/whitequark/parser/blob/95d26953ebe823211845fb84cb93c18cd501f561/lib/parser/lexer/literal.rb#L250

Ref. https://github.com/ruby/ruby/blob/ruby_2_5/NEWS

So, even Ruby 2.0 can be installed now, however it will not work.
@iliabylich iliabylich merged commit 3f2bbef into whitequark:master Jan 6, 2024
9 checks passed
@iliabylich
Copy link
Collaborator

Thanks!

@Watson1978 Watson1978 deleted the required_ruby_version branch January 6, 2024 17:36
koic added a commit to koic/parser that referenced this pull request Jan 6, 2024
This is an alternative approach to the changes in whitequark#985.
The Parser gem may be required to operate across as many Ruby versions as possible.
The use of `delete_suffix` starts from Parser version 3.3.0.0.
Therefore, by replacing `delete_suffix` with `sub`, and releasing Parser 3.3.0.1,
supporting Ruby 2.0 would be feasible.
@koic koic mentioned this pull request Jan 6, 2024
iliabylich pushed a commit that referenced this pull request Jan 6, 2024
This is an alternative approach to the changes in #985.
The Parser gem may be required to operate across as many Ruby versions as possible.
The use of `delete_suffix` starts from Parser version 3.3.0.0.
Therefore, by replacing `delete_suffix` with `sub`, and releasing Parser 3.3.0.1,
supporting Ruby 2.0 would be feasible.
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