diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-31 02:57:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-31 02:57:30 +0000 |
commit | 0c6edda08c5c571029d099fc3d34350ea669e067 (patch) | |
tree | f44ff53c85311b344080dc0b0d8a9989a09d65fb /test/ruby | |
parent | 2c62beb6b61e5c66ac165e6d759750e9340f5f62 (diff) | |
download | ruby-0c6edda08c5c571029d099fc3d34350ea669e067.tar.gz |
parse.y: last node of NODE_ARRAY
* parse.y (heredoc_dedent): manage the last node of NODE_ARRAY,
when concatenating dedented literals.
[ruby-core:89649] [Bug #15272]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_syntax.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 28f563046f..bd9c996138 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -759,6 +759,10 @@ eom assert_syntax_error('<<~ "#{}"', /unexpected <</) end + def test_dedented_heredoc_concatenation + assert_equal("\n0\n1", eval("<<~0 '1'\n \n0\#{}\n0")) + end + def test_lineno_operation_brace_block expected = __LINE__ + 1 actual = caller_lineno\ |