Closed aliaksandrb closed 9 months ago
Hio!
The library using String modification in place in some places, for example:
''.tap do |preface| if descriptions_for_preset_values.any? preface << 'After setting ' preface << descriptions_for_preset_values.to_sentence preface << ', then ' else preface << 'After ' end . . . end
So, when the application has frozen-string-literals enabled globally (instead of per-file "magic" comment) via:
frozen-string-literals
ENV RUBYOPT='--enable=frozen-string-literal'
It raises an error when specs are executed:
FrozenError: can't modify frozen String: "" # /usr/local/share/gems/gems/shoulda-matchers-5.3.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:550:in `block in default_failure_message_preface'
🥲
Yay, thanks! 🥳
Hio!
The library using String modification in place in some places, for example:
So, when the application has
frozen-string-literals
enabled globally (instead of per-file "magic" comment) via:It raises an error when specs are executed:
🥲