Skip to content

Conversation

@jeremy
Copy link

@jeremy jeremy commented Dec 17, 2024

Assume string literals are frozen by default for Ruby 3.4+ compatibility. Builds on #462.

/cc @yahonda

yahonda and others added 2 commits October 11, 2024 12:23
This commit addresses the `warning: literal string will be frozen in the future` warnings
appeared at Rails CI https://buildkite.com/rails/rails-nightly/builds/1122#019263a3-2200-4e62-a6a8-028cffa60aaf

Here are the warnings appeared:
```
/usr/local/lib/ruby/gems/3.4.0+0/bundler/gems/httpclient-d57cc6d5ffee/lib/httpclient.rb:1256: warning: literal string will be frozen in the future
/usr/local/lib/ruby/gems/3.4.0+0/bundler/gems/httpclient-d57cc6d5ffee/lib/httpclient/http.rb:580: warning: literal string will be frozen in the future
/usr/local/lib/ruby/gems/3.4.0+0/bundler/gems/httpclient-d57cc6d5ffee/lib/httpclient/session.rb:954: warning: literal string will be frozen in the future
/usr/local/lib/ruby/gems/3.4.0+0/bundler/gems/httpclient-d57cc6d5ffee/lib/httpclient/util.rb:71: warning: literal string will be frozen in the future
```

There should be some warnings remained because Rails CI does not use all of httpclient code. I'll open some pull requests later to address remaining ones.

Ref: https://bugs.ruby-lang.org/issues/20205
Co-authored-by: Hamed Asghari <hasghari@gmail.com>
@takkanm
Copy link
Collaborator

takkanm commented Feb 18, 2025

Sorry for the late reply, and thank you for the help. However, since there's a new PR #471 with the same goal and fewer changes, I'm leaning towards merging that one. If you have any strong reasons why this magic comment correction should be prioritized, please feel free to reopen it.

@takkanm takkanm closed this Feb 18, 2025
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.

5 participants