`warning: literal string will be frozen in the future` in ruby 3.4.0-preview2
Warning by https://bugs.ruby-lang.org/issues/20205
# bundle exec rake minitest
Run options: --seed 23847
# Running:
/ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
...../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
./ruby-http-client/lib/ruby_http_client.rb:156: warning: literal string will be frozen in the future
./ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
/ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
/ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
....../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.../ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
.F./ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
./ruby-http-client/lib/ruby_http_client.rb:143: warning: literal string will be frozen in the future
The choices are these
- Use
''.duporString.new('')or+''. - Magic comment
frozen_string_literal: falselike Shopify/httpclient. - Ignore warnings until Ruby v3.4 policy is finalized.
- and other...
Hi @tmimura39 I made a PR that hopefully should resolve the issue
Thanks. Yes, I agree. I think that will resolve this issue 😄
Any update on that? Ruby 3.4 is publicly available now.
please could you look at my PR @pmcanseco thanks
Is there any progress on this issue? We updated to Ruby 3.4 and we're seeing these warnings as well. The next version of Ruby isn't far off, and while it doesn't seem like the change to frozen strings will happen this year, it's still better to get ahead of the change.
https://bugs.ruby-lang.org/issues/20205#note-75
Who is currently maintaining this repository? I’ll mention people who seem to be involved based on past commits.
@garethpaul @eshanholtz @thinkingserious
If you know who’s in charge, I’d appreciate it if you could let me know.
Since there was no response, I went ahead and emailed the address listed at https://github.com/sendgrid/ruby-http-client/blob/4c9405c448dfec47ee0d37bfcafb10dab58da077/ruby_http_client.gemspec#L8