From f2b094a522717be65a65f478159e6a3166b8651c Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 11 Mar 2018 12:19:08 +0000 Subject: parse.y: fix interpolated string literal dedent * parse.y (heredoc_dedent): fix interpolated string literal dedent, remove indentations from only nodes with the newline flag. [ruby-core:85983] [Bug #14584] * parse.y (here_document): set the newline flag on literal string nodes starting at the beginning of line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 7f42bd5965..81737d5103 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -667,6 +667,12 @@ e" assert_dedented_heredoc(expected, result) end + def test_dedented_heredoc_expr_string + result = ' one#{" two "}'"\n" + expected = 'one#{" two "}'"\n" + assert_dedented_heredoc(expected, result) + end + def test_lineno_after_heredoc bug7559 = '[ruby-dev:46737]' expected, _, actual = __LINE__, <