diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-12 14:39:18 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-12 14:39:18 +0000 |
commit | 0e05caace7ba048a874629c30b5003b8611ffea5 (patch) | |
tree | 1b6c15e318322287522b55ad0efe85ef7026e67e /test/ruby | |
parent | 0179055d2d146d495b93c148e431cf103b55208f (diff) |
merge revision(s) 57717: [Backport #13253]
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_4@57912 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 61aab4bee5..e4f73b97cf 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -656,6 +656,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\ |