Skip to content

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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yahonda
Copy link
Contributor

@yahonda yahonda commented Feb 18, 2025

This pull request addresses warning: literal string will be frozen in the future introduced since Ruby 3.4

Steps to reproduce

This will emit the warning: literal string will be frozen in the future warnings and shows the info: the string was created here to see where the string literal is created.

$ ruby -v
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x86_64-linux]
$ cd google-apis-core
$ RUBYOPT="--debug-frozen-string-literal" bundle exec rspec -w

Warnings addressed by this commit

/path/to/google-apis-core/lib/google/apis/core/composite_io.rb:45: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/download.rb:49: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/http_command.rb:286: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/http_command.rb:388: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/http_command.rb:396: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/multipart.rb:34: info: the string was created here
/path/to/google-apis-core/lib/google/apis/core/multipart.rb:62: info: the string was created here
/path/to/google-apis-core/lib/google/apis/errors.rb:46: info: the string was created here

@yahonda yahonda requested a review from a team as a code owner February 18, 2025 12:54
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