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

Only dedent first string literal on each line of a heredoc #106

Merged
merged 2 commits into from
Sep 13, 2020

Conversation

mvz
Copy link
Owner

@mvz mvz commented Sep 13, 2020

This fixes incorrect parsing for cases like the following:

<<~FOO
  #{foo} bar
FOO

In this case, the space before 'bar' would be removed. This is a bug in Ripper, but by overriding Ripper::SexpBuilder's #on_heredoc_dedent method it can be fixed.

mvz added 2 commits September 13, 2020 20:04
This fixes incorrect parsing for cases like the following:

<<~FOO
  #{foo} bar
FOO

In this case, the space before 'bar' would be removed. This is a bug in
Ripper, but by overriding Ripper::SexpBuilder's #on_heredoc_dedent method
it can be fixed.
@mvz mvz merged commit 69aac6f into master Sep 13, 2020
@mvz mvz deleted the fix-dedented-heredoc-handling branch September 13, 2020 18:29
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.

1 participant