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

Support frozen strings with REXML #728

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

frederikspang
Copy link

Tests are passing with export RUBYOPT=--enable-frozen-string-literal

@johnnyshields
Copy link
Collaborator

@frederikspang I am pretty sure this is fixed on v2 already, but @pitbulk it might make sense to fix this on master anyway as it will is needed for Ruby 3.4

@frederikspang
Copy link
Author

@johnnyshields I've adjusted some stuff from review. UUID_PREFIX is used as a constant, and .replace with Utils.set_prefix, which is not working out great :). I've replaced it with a variable. Should we deprecate or remove the (now unused) constant?

@johnnyshields
Copy link
Collaborator

@frederikspang yikes wow we were calling replace on a constant 🤦‍♂️ . The way you have it now with @@prefix is fine.

@pitbulk
Copy link
Collaborator

pitbulk commented Jan 10, 2025

Changes are not compatible with ruby 2.X versions.

@johnnyshields, for this, the v2 should be used instead. we should address the UUID_PREFIX on that brach.

@johnnyshields
Copy link
Collaborator

johnnyshields commented Jan 11, 2025

@pitbulk frozen string stuff is handled already on 2.x. This is a "backport" in case we want it on 1.x branch, but the alternative here would be to just close this PR and tell users they must use 2.x for Ruby 3.4+. Which is reasonable in my opinion.

@johnnyshields
Copy link
Collaborator

Mutable constant addressed here: #735

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.

3 participants