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

Detection of frozen strings doesn't work for Ruby 3.4 chilled strings #151

Open
jeremyevans opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@jeremyevans
Copy link
Contributor

The code at https://github.com/judofyr/temple/blob/master/lib/temple/filters/encoding.rb#L13 doesn't work correctly for Ruby 3.4 chilled strings. You need to switch from s = s.dup if s.frozen? to s = +s, similar to what I did in Erubi (jeremyevans/erubi@6aa6f52, though you don't need to worry about the fallback as temple is Ruby 2.5+). This was found by the tilt specs.

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