You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting frozen-string-literal warnings with Ruby 3.4.1 from magic.rb line 120. I also have a potential solution, if indeed this is an issue...and I am happy to open a PR for review & feedback.
To recreate the issue, you can generate a minimal Rails app with the following (making sure to use Ruby 3.4+):
Running 1 tests in a single process (parallelization threshold is 50)
Run options: --name "/MarcelTest(#|::)/" --seed 24608
# Running:
/path_to_gems/marcel-1.0.4/lib/marcel/magic.rb:120: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)
.
Finished in 0.050929s, 19.6352 runs/s, 19.6352 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
The text was updated successfully, but these errors were encountered:
@jeremy ok, after more digging it turns out that it's the tests that are generating the "chilled" strings and therefore triggering the deprecation warning. Adding # frozen_string_literal: true to the test files resolved the issue for me.
I'm getting frozen-string-literal warnings with Ruby 3.4.1 from magic.rb line 120. I also have a potential solution, if indeed this is an issue...and I am happy to open a PR for review & feedback.
To recreate the issue, you can generate a minimal Rails app with the following (making sure to use Ruby 3.4+):
rails new marcel_scaffold --skip-git --skip-docker --skip-keeps --skip-asset-pipeline --skip-rubocop --skip-brakeman --skip-ci --skip-kamal --skip-devcontainer --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-javascript --skip-hotwire --skip-decrypted-diffs --skip-action-cable --skip-bootsnap --skip-dev-gems --skip-jbuilder --skip-system-test --skip-thruster
Then execute:
And create & run a test like this:
You should see a warning as below:
The text was updated successfully, but these errors were encountered: