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

Address warning: literal string will be frozen in the future #886

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Oct 30, 2024

This commit addresses the following warnings.

  • Steps to reproduce:
$ ruby -v
ruby 3.4.0dev (2024-10-26T13:20:34Z master 484ea00d2e) +PRISM [x86_64-linux]
$ RUBYOPT="--debug-frozen-string-literal" bundle exec thor spec
  • Warnings addressed by this commit:
/path/to/thor/spec/base_spec.rb:322: warning: literal string will be frozen in the future
/path/to/thor/spec/base_spec.rb:321: info: the string was created here
/path/to/thor/spec/parser/options_spec.rb:121: warning: literal string will be frozen in the future
/path/to/thor/spec/parser/options_spec.rb:120: info: the string was created here

Refer to:
https://bugs.ruby-lang.org/issues/20205
ruby/ruby#11893

This commit addresses the following warnings.

- Steps to reproduce:
```ruby
$ ruby -v
ruby 3.4.0dev (2024-10-26T13:20:34Z master 484ea00d2e) +PRISM [x86_64-linux]
$ RUBYOPT="--debug-frozen-string-literal" bundle exec thor spec
```

- Warnings addressed by this commit:
```
/path/to/thor/spec/base_spec.rb:322: warning: literal string will be frozen in the future
/path/to/thor/spec/base_spec.rb:321: info: the string was created here
```

```
/path/to/thor/spec/parser/options_spec.rb:121: warning: literal string will be frozen in the future
/path/to/thor/spec/parser/options_spec.rb:120: info: the string was created here
```

Refer to:
https://bugs.ruby-lang.org/issues/20205
ruby/ruby#11893
@yahonda yahonda merged commit 3178667 into rails:main Oct 30, 2024
8 checks passed
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.

1 participant