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

Run CI build with --enable-frozen-string-literal Ruby command line option #640

Open
floehopper opened this issue Mar 29, 2024 · 2 comments

Comments

@floehopper
Copy link
Member

floehopper commented Mar 29, 2024

Some useful context in https://gist.github.com/fxn/bf4eed2505c76f4fca03ab48c43adc72.

@floehopper
Copy link
Member Author

The need to do this might go away when Ruby v3.4 is released, because then String literals will be frozen by default.

Also I have just fixed a bunch of relevant warnings in #672.

@floehopper
Copy link
Member Author

The need to do this might go away when Ruby v3.4 is released, because then String literals will be frozen by default.

This doesn't appear to be true. Instead, any string literals which are not specifically marked as frozen will display a warning if mutated, but they can still be mutated.

This suggests it might be a good idea to add the magic comment to all files: # frozen_string_literal: true...?

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

No branches or pull requests

1 participant