diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 02:02:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 02:02:38 +0000 |
commit | ff36c25f475d63135d7088a4c25cde3d34045daa (patch) | |
tree | 193a7f9efe476201b6f5b413a0407e1f3476fa25 /test/ruby/test_parse.rb | |
parent | c28f8b039489be50ca2d414b7dfec1190444d10e (diff) | |
download | ruby-ff36c25f475d63135d7088a4c25cde3d34045daa.tar.gz |
parse.y: fix parser_yyerror
* parse.y (parser_yyerror): fix buffer overflow at truncation of
error line. [ruby-core:81790] [Bug #13687]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 030442f9e9..d2fc5f0721 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1001,6 +1001,12 @@ x = __ENCODING__ end; end + def test_unexpected_token_error + assert_raise(SyntaxError) do + eval('"x"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') + end + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} |