-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
make the library work with globally enabled frozen-string-literals #1598
make the library work with globally enabled frozen-string-literals #1598
Conversation
in order to run the tests and see the error you have to run them this way RUBYOPT='--enable=frozen-string-literal' bundle exec appraisal rails_7_1 rspec spec/ and ofc you can replace |
I believe it's a positive step to take. If everyone is in agreement, let's proceed with updating the CI to run with this configuration: RUBYOPT='--enable=frozen-string-literal' |
Thanks for the feedback @vsppedro I will put some hours of work on this issue and update this pull request as I progress |
Nice work, @amalrik. I think we need to add RUBYOPT='--enable=frozen-string-literal' to the CI configuration to be sure that is working. What do you think? shoulda-matchers/.github/workflows/ci.yml Line 64 in d611911
shoulda-matchers/.github/workflows/ci.yml Line 66 in d611911
|
tks man I agree. |
To be honest, I'm not a fan of it, but I think it's a good thing to have to ensure that we aren't introducing anything that could inadvertently alter a string and potentially disrupt this feature. Let me check how other gems approach this. |
hey @vsppedro could you check this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Sorry for taking so long. Please, squash the commits.
more refacts to make tests pass with frozen strings fix linter errors clean up some code enable frozen string literals on CI
e8bf776
to
b762994
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fixes #1563
EDIT:after some more verification I noticed we need more changes in order to make the tests pass with the frozen-string option globally enabled. LMK if you guys think this is a useful contribution to project.