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

Fix interpolated heredoc #4664

Merged
merged 1 commit into from
Jul 21, 2021
Merged

Fix interpolated heredoc #4664

merged 1 commit into from
Jul 21, 2021

Conversation

eileencodes
Copy link
Contributor

This fixes https://bugs.ruby-lang.org/issues/18038. The provided
reproduction showed that this happens in heredocs with double
interpolation. In this case DSTR was getting returned but needs to be
convered to a EVSTR which is what is returned by the function. There
may be an additional bug here that we weren't able to produce. It seems
odd that STR returns DSTR while everything else should return
EVSTR since the function is new_evstr.

[Bug #18038][ruby-core:104597]

Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org

cc/ @tenderlove

This fixes https://bugs.ruby-lang.org/issues/18038. The provided
reproduction showed that this happens in heredocs with double
interpolation. In this case `DSTR` was getting returned but needs to be
convered to a `EVSTR` which is what is returned by the function. There
may be an additional bug here that we weren't able to produce. It seems
odd that `STR` returns `DSTR` while everything else should return
`EVSTR` since the function is `new_evstr`.

[Bug #18038][ruby-core:104597]

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
@eileencodes
Copy link
Contributor Author

This bug is also present in 2.5, 2.6, 2.7, and 3.0.

@tenderlove tenderlove merged commit b940a45 into ruby:master Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants