diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-14 04:35:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-14 04:35:28 +0000 |
commit | bc44acb5a34f9b54c6188cb081f03f1935ce07dd (patch) | |
tree | a871a27820120384875b96c3e0819e743ca03b1a /test | |
parent | 42d9712e78744e19ac71a7c0eaa099ac9203e1b1 (diff) | |
download | ruby-bc44acb5a34f9b54c6188cb081f03f1935ce07dd.tar.gz |
parse.y: fix yyerror message
* parse.y (parser_yyerror): show the error line even if the error
is at the end.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 57d03166c7..b4a63e369d 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -953,6 +953,11 @@ x = __ENCODING__ end end + def test_yyerror_at_eol + assert_syntax_error(" 0b", /\^/) + assert_syntax_error(" 0b\n", /\^/) + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} |