diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-01 00:12:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-01 00:12:12 +0000 |
commit | c538233805a026f4e24b6ac89e38e70bc01189a5 (patch) | |
tree | 40d9811ea3216d54bda5b73fcf7ce8fda14109d9 /test | |
parent | 1f1bd22ea759a716458bb65914ad398b563fde49 (diff) | |
download | ruby-c538233805a026f4e24b6ac89e38e70bc01189a5.tar.gz |
parse.y: invalid symbol
* parse.y (parser_yylex): ':' separated by a comment and a newline
is not valid as symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index a047454513..552cf5cd00 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -612,6 +612,12 @@ eom end end + def test_invalid_symbol_space + assert_syntax_error(": foo", /unexpected ':'/) + assert_syntax_error(": #\n foo", /unexpected ':'/) + assert_syntax_error(":#\n foo", /unexpected ':'/) + end + private def not_label(x) @result = x; @not_label ||= nil end |