diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-01 06:45:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-01 06:45:17 +0000 |
commit | b5ba1dcdf0d0db9dc1cdbbc9710e9cab4a6f3bab (patch) | |
tree | 8d6786a64f476fd2c60e78b64df93d4a66391a7c /test | |
parent | 3dce236bf5f2343d14a30619c8c5649002744f22 (diff) | |
download | ruby-b5ba1dcdf0d0db9dc1cdbbc9710e9cab4a6f3bab.tar.gz |
parse.y: invalid instance/class variable names
* parse.y (parse_atmark): mere atmark and two atmarks without
succeeding identifiers are invalid as instance/class variable
names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 89b5ef1993..70b38a2a7e 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -650,10 +650,12 @@ x = __ENCODING__ def test_invalid_instance_variable assert_raise(SyntaxError) { eval('@#') } + assert_raise(SyntaxError) { eval('@') } end def test_invalid_class_variable assert_raise(SyntaxError) { eval('@@1') } + assert_raise(SyntaxError) { eval('@@') } end def test_invalid_char |