Skip to content

Conversation

@byroot
Copy link
Contributor

@byroot byroot commented Feb 18, 2025

Based on #462, with some extra fixes and also a CI job that test with frozen string literals enabled to ensure there's no regressions.

cc @yahonda @takkanm

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
@byroot byroot force-pushed the frozen-string-literal branch 2 times, most recently from d286685 to f9ece3f Compare February 18, 2025 09:02
@takkanm
Copy link
Collaborator

takkanm commented Feb 18, 2025

Thank you. Looks good to me.

@takkanm takkanm merged commit d29d1aa into nahi:master Feb 18, 2025
10 checks passed
yahonda added a commit to yahonda/rails that referenced this pull request Feb 22, 2025
httpclient 2.9.0 has been released that supports Ruby 3.4 changes:

- making `mutex_m` as bundled gem
nahi/httpclient#455
nahi/httpclient#472

- Chilled strings
nahi/httpclient#471

Kind of reverting rails#50911
JuanVqz pushed a commit to JuanVqz/rails that referenced this pull request Feb 24, 2025
httpclient 2.9.0 has been released that supports Ruby 3.4 changes:

- making `mutex_m` as bundled gem
nahi/httpclient#455
nahi/httpclient#472

- Chilled strings
nahi/httpclient#471

Kind of reverting rails#50911
dkani pushed a commit to dkani/rails that referenced this pull request Mar 3, 2025
httpclient 2.9.0 has been released that supports Ruby 3.4 changes:

- making `mutex_m` as bundled gem
nahi/httpclient#455
nahi/httpclient#472

- Chilled strings
nahi/httpclient#471

Kind of reverting rails#50911
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.

3 participants