-
Notifications
You must be signed in to change notification settings - Fork 199
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
Suppress Ruby 3.4's warning #1028
Merged
iliabylich
merged 1 commit into
whitequark:master
from
koic:suppress_frozen_string_warning
Jul 19, 2024
Merged
Suppress Ruby 3.4's warning #1028
iliabylich
merged 1 commit into
whitequark:master
from
koic:suppress_frozen_string_warning
Jul 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting with Ruby 3.4, there is a gradual plan to freeze strings: https://bugs.ruby-lang.org/issues/20205#note-35 This PR suppresses the following Ruby 3.4's warning: ```console /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/parser-3.3.4.0/lib/parser/source/buffer.rb:97: warning: literal string will be frozen in the future ```
Thanks! |
koic
added a commit
to koic/parser
that referenced
this pull request
Aug 8, 2024
Follow up whitequark#1031 (comment) and reverts whitequark#1028. This PR fixes the following error: ```console $ ci/run_rubocop_specs (snip) ==> Failed Examples rspec # RuboCop::Cop::Lint::PercentStringArray with binary encoded source adds an offense and corrects when tokens contain quotes rspec # RuboCop::Cop::Lint::PercentStringArray with binary encoded source accepts if tokens contain no quotes rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:3:6:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is lf and the default external encoding is US_ASCII can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:3:5:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is lf and there are many lines ending with CR+LF can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:2:6:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is crlf and the default external encoding is US_ASCII can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:2:5:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is crlf and there are many lines ending with LF can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/lint/percent_symbol_array_spec.rb[1:1:11:2]' # RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string with binary encoded source accepts if tokens contain no quotes rspec './spec/rubocop/cop/lint/percent_symbol_array_spec.rb[1:1:11:1]' # RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string with binary encoded source registers an offense and corrects when tokens contain quotes ``` whitequark#1028 has an issue with the fix, causing RuboCop's CI to fail. This PR prioritizes avoiding CI failures, so for now, it reverts the above change. Improvements for handling warnings in Ruby 3.4.0dev and displaying clear results when whitequark/parser fails in the RuboCop CI matrix will be addressed separately.
iliabylich
pushed a commit
that referenced
this pull request
Aug 8, 2024
Follow up #1031 (comment) and reverts #1028. This PR fixes the following error: ```console $ ci/run_rubocop_specs (snip) ==> Failed Examples rspec # RuboCop::Cop::Lint::PercentStringArray with binary encoded source adds an offense and corrects when tokens contain quotes rspec # RuboCop::Cop::Lint::PercentStringArray with binary encoded source accepts if tokens contain no quotes rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:3:6:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is lf and the default external encoding is US_ASCII can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:3:5:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is lf and there are many lines ending with CR+LF can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:2:6:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is crlf and the default external encoding is US_ASCII can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/layout/end_of_line_spec.rb[1:2:5:2]' # RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is crlf and there are many lines ending with LF can inspect non-UTF-8 encoded source with proper encoding comment rspec './spec/rubocop/cop/lint/percent_symbol_array_spec.rb[1:1:11:2]' # RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string with binary encoded source accepts if tokens contain no quotes rspec './spec/rubocop/cop/lint/percent_symbol_array_spec.rb[1:1:11:1]' # RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string with binary encoded source registers an offense and corrects when tokens contain quotes ``` #1028 has an issue with the fix, causing RuboCop's CI to fail. This PR prioritizes avoiding CI failures, so for now, it reverts the above change. Improvements for handling warnings in Ruby 3.4.0dev and displaying clear results when whitequark/parser fails in the RuboCop CI matrix will be addressed separately.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting with Ruby 3.4, there is a gradual plan to freeze strings: https://bugs.ruby-lang.org/issues/20205#note-35
This PR suppresses the following Ruby 3.4's warning: