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 | 7dff424b8f14f2779555a39510090f0efc5764fe (patch) | |
tree | 21903c82e7e913360dd2c79a47a43c0fcd5066a3 /test | |
parent | 3c320bf5deb5738ff022c94941c49e8c29be12d2 (diff) | |
download | ruby-7dff424b8f14f2779555a39510090f0efc5764fe.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')
-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 |