Skip to content

Ensure buffer empty string is mutable in new rubies that may default frozen literals#66

Open
jrochkind wants to merge 1 commit into
rsmdt:masterfrom
jrochkind:avoid_frozen_string_bug
Open

Ensure buffer empty string is mutable in new rubies that may default frozen literals#66
jrochkind wants to merge 1 commit into
rsmdt:masterfrom
jrochkind:avoid_frozen_string_bug

Conversation

@jrochkind
Copy link
Copy Markdown

@jrochkind jrochkind commented Apr 27, 2026

Avoids Ruby 3.4 deprecation:

yell-2.2.2/lib/yell/formatter.rb:212: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)

I don't know there aren't other problems in codebase similar to this still hidden; this is just the one my own test suite(s) for my dependant projects caught.

The +"literal" syntax has been supported since ruby 2.3 released in Dec 2015 -- I know yell is probably still used in some old contexts, but this seems old enough to safely use.

Closes #65. If merged, a (patch?) release would be helpful! Thank you @rsmdt !

@jrochkind jrochkind changed the title Ensure buffer empty string in mutable in new rubies that may default frozen literals Ensure buffer empty string is mutable in new rubies that may default frozen literals Apr 27, 2026
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

Successfully merging this pull request may close these issues.

Formatter produces frozen warning in ruby 3.4

1 participant