mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 07:26:00 +02:00
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
This commit is contained in:
parent
8e2d0deb88
commit
f29e5013ad
2 changed files with 10 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue