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

test_render_mutate_string_literal shows inline template:1: warning: literal string will be frozen in the future #51689

Closed
yahonda opened this issue Apr 30, 2024 · 2 comments · Fixed by #51736

Comments

@yahonda
Copy link
Member

yahonda commented Apr 30, 2024

Managed to reproduce inline template:1: warning: literal string will be frozen in the future warnings at https://buildkite.com/rails/rails-nightly/builds/474#018f2c4e-c61f-4acf-847e-41d4a942240b

Steps to reproduce

  • Install ruby 3.4.0dev
git clone https://github.com/rails/rails
cd rails/actionview
bundle install
bin/test test/template/render_test.rb -n test_render_mutate_string_literal

Expected behavior

It should pass without warnings.

Actual behavior

It passes with inline template:1: warning: literal string will be frozen in the future warnings.

$ bin/test test/template/render_test.rb -n test_render_mutate_string_literal
... snip ...

inline template:1: warning: literal string will be frozen in the future
.inline template:1: warning: literal string will be frozen in the future
..inline template:1: warning: literal string will be frozen in the future
.

Finished in 0.506033s, 7.9046 runs/s, 25.6900 assertions/s.
4 runs, 13 assertions, 0 failures, 0 errors, 0 skips
$

System configuration

Rails version: main branch

Ruby version: ruby 3.4.0dev (2024-04-30T10:29:38Z master 8fb430c1da) [x86_64-linux]

@yahonda
Copy link
Member Author

yahonda commented Apr 30, 2024

I have not bisected the Ruby commit , I assume this is related to ruby/ruby#10262

@maniSHarma7575
Copy link
Contributor

maniSHarma7575 commented May 5, 2024

@yahonda I have given a try to fix the issue. Now warning is removed.

Ruby version: ruby 3.4.0dev (2024-05-04T09:03:55Z master 96710a3139) [arm64-darwin23]

$ bin/test test/template/render_test.rb -n test_render_mutate_string_literal
Running 533 tests in parallel using 8 processes
Run options: -n test_render_mutate_string_literal --seed 32111

# Running:

....

Finished in 0.316077s, 12.6551 runs/s, 41.1292 assertions/s.
4 runs, 13 assertions, 0 failures, 0 errors, 0 skips

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants