diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-25 08:30:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-25 08:30:11 +0000 |
commit | f29e5013adcd9c8753587471727e3280aaf89686 (patch) | |
tree | d3b5665545097cce8450dac62a61e41b77eb28ca /test/ruby/test_parse.rb | |
parent | 8e2d0deb88c4c9539b5c963da8cfad2e8205298e (diff) |
parse.y: limit codepoint length
* parse.y (parser_tokadd_codepoint): limit Unicode codepoint
length. too long codepoint has been split unexpectedly since
r57050.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 982f91dc52..cc38214fd6 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -516,6 +516,8 @@ class TestParse < Test::Unit::TestCase src = '"\xD0\u{90'"\n""000000000000000000000000" assert_syntax_error(src, /:#{__LINE__}: unterminated/o) + assert_syntax_error('"\u{100000000}"', /invalid Unicode escape/) + assert_equal("\x81", eval('"\C-\M-a"')) assert_equal("\177", eval('"\c?"')) end |