Skip to content

Freeze src in initialize#105

Merged
k0kubun merged 1 commit intoruby:masterfrom
jhawthorn:freeze_str
Feb 23, 2026
Merged

Freeze src in initialize#105
k0kubun merged 1 commit intoruby:masterfrom
jhawthorn:freeze_str

Conversation

@jhawthorn
Copy link
Member

This freezes @src inside of initialize, which allows for Erb.new(...).freeze to be Ractor-shareable (previously Ractor.make_shareable which applies recursively would have been necessary).

One explicit freeze of erb is still necessary because of filename=/lineno=/location=

@k0kubun k0kubun merged commit 3d4dc31 into ruby:master Feb 23, 2026
9 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 23, 2026
@G-Rath
Copy link
Contributor

G-Rath commented Mar 15, 2026

fwiw I've found that versions of tilt before v2.5.0 break as a result of this - I don't think it's a big deal even though technically you could say this is a breaking change, but I wanted to post it somewhere in case someone has an older app like we did that was not on the latest version :)

Our erb got bumped indirectly when updating action_text-trix to fix a security issue

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