Skip to content

Clear flags on interpolated strings #3606

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Conversation

tenderlove
Copy link
Member

When inner strings aren't frozen, we need to clear the flags on interpolated string nodes so that we don't emit wrong instructions.

The compiler is currently incorrectly emitting frozen strings because the parser is erroneously declaring interpolated strings as "frozen". We need to fix this behavior in the parser so we can fix the compiler in CRuby. This patch is a partial fix for this bug

When inner strings aren't frozen, we need to clear the flags on
interpolated string nodes so that we don't emit wrong instructions.

The compiler is currently incorrectly emitting frozen strings because
the parser is erroneously declaring interpolated strings as "frozen".
We need to fix this behavior in the parser so we can fix the compiler in
CRuby.  This patch is a partial fix for [this bug](https://bugs.ruby-lang.org/issues/21187)
@tenderlove tenderlove merged commit 4052d93 into ruby:main Jul 21, 2025
58 checks passed
@tenderlove tenderlove deleted the clear-flags branch July 21, 2025 23:04
tenderlove added a commit to tenderlove/ruby that referenced this pull request Jul 22, 2025
Strings concatenated with backslash may end up being frozen when they
shouldn't be.  This commit fixes the issue.  It required a change
upstream in Prism, but also a change to the Prism compiler in CRuby.

  ruby/prism#3606

[Bug #21187]
tenderlove added a commit to tenderlove/ruby that referenced this pull request Jul 22, 2025
Strings concatenated with backslash may end up being frozen when they
shouldn't be.  This commit fixes the issue.  It required a change
upstream in Prism, but also a change to the Prism compiler in CRuby.

  ruby/prism#3606

[Bug #21187]
tenderlove added a commit to ruby/ruby that referenced this pull request Jul 22, 2025
Strings concatenated with backslash may end up being frozen when they
shouldn't be.  This commit fixes the issue.  It required a change
upstream in Prism, but also a change to the Prism compiler in CRuby.

  ruby/prism#3606

[Bug #21187]
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy