diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-22 14:26:42 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-22 14:26:42 +0000 |
commit | ddd7dd0f8cb255f81603de6e0656f0fd0c245804 (patch) | |
tree | 465af15ea1bab2cf418073e74cbfa5ddb70c8e29 /test/ruby/test_syntax.rb | |
parent | 10e0fc1b6c8fdc8d275653052e129a2d7569e58b (diff) |
merge revision(s) 56020,57717: [Backport #13253]
parse.y: heredoc token
* parse.y (parser_heredoc_identifier): gather branches by quote
char.
parse.y: indent at invalid identifier
* parse.y (parser_heredoc_identifier): set indent only when valid
identifier, not to dedent non-existent contents later.
[ruby-core:79772] [Bug #13253]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-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 50c3e7e6b5..eba5f6d851 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -622,6 +622,10 @@ eom assert_equal(expected, actual, bug7559) end + def test_dedented_heredoc_invalid_identifer + assert_syntax_error('<<~ "#{}"', /unexpected <</) + end + def test_lineno_operation_brace_block expected = __LINE__ + 1 actual = caller_lineno\ |