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

Add frozen_string_literal to CompositeIO and Multipart #18722

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

Conversation

allan-pires
Copy link

Description

This adds the magic comment for making string literals frozen on CompositeIO and Multipart.
We also utilize the unfrozen string +'' on a few vars to allow the rest of the file to utilize frozen string literals.

Context

There was a deprecation warning for chilled strings merged recently in Ruby: ruby/ruby@12be40a

And with that started to see the following warnings on google-apis-core:

 /vendor/gems/3.4.0/ruby/3.4.0+0/gems/google-apis-core-0.11.3/
 lib/google/apis/core/composite_io.rb:45:in 'String#replace':
/vendor/gems/3.4.0/ruby/3.4.0+0/gems/google-apis-core-0.11.3/
lib/google/apis/core/composite_io.rb:52:in 'Google::Apis::Core::CompositeIO#read':
/vendor/gems/3.4.0/ruby/3.4.0+0/gems/google-apis-core-0.11.3/
lib/google/apis/core/multipart.rb:63:in 'Google::Apis::Core::FilePart#to_io':
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@allan-pires allan-pires changed the title [WIP] Add frozen_string_literal to CompositeIO and Multipart May 17, 2024
@allan-pires allan-pires marked this pull request as ready for review May 17, 2024 00:33
@allan-pires allan-pires requested a review from a team as a code owner May 17, 2024 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant