diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-16 13:39:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-16 13:39:18 +0000 |
commit | 80d502b88116e95e4b17b4e7278d0d47106253db (patch) | |
tree | 21903c82e7e913360dd2c79a47a43c0fcd5066a3 /test/ruby/test_parse.rb | |
parent | f01f98f022123a3e5608e43bc47a32a7fac7b90a (diff) | |
download | ruby-80d502b88116e95e4b17b4e7278d0d47106253db.tar.gz |
parse.y: utf-8 codepoints
* parse.y (parser_tokadd_utf8): skip spaces in the current line,
without advancing the line, to get rid of dangling pointer.
[ruby-core:82029] [Bug #13742]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index aea1f4bf5c..b3795a4ac4 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -498,6 +498,9 @@ class TestParse < Test::Unit::TestCase e = assert_syntax_error('"\C1"', /escape character syntax/) assert_equal(' ^~~', e.message.lines.last, mesg) + src = '"\xD0\u{90'"\n""000000000000000000000000" + assert_syntax_error(src, /:#{__LINE__}: unterminated/o) + assert_equal("\x81", eval('"\C-\M-a"')) assert_equal("\177", eval('"\c?"')) end |