diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-03-17 16:58:31 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-03-17 16:58:31 +0900 |
| commit | b588e5a5b7cfc0e7a1c84c235a0f5daa5bf83a47 (patch) | |
| tree | 3452bf56f464cf3556d63782696c42b2bbb4880e /test | |
| parent | 15b6499c8b9197e885713a7896eaf45419fbef47 (diff) | |
| download | mruby-b588e5a5b7cfc0e7a1c84c235a0f5daa5bf83a47.tar.gz mruby-b588e5a5b7cfc0e7a1c84c235a0f5daa5bf83a47.zip | |
Fix class/instance variable name validation
- `@@?` etc are invalid class variable name.
- `@1` etc are invalid instance variable name.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/kernel.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb index 74176fbd0..d99358c0c 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -391,11 +391,10 @@ assert('Kernel#remove_instance_variable', '15.3.1.3.41') do tri = Test4RemoveInstanceVar.new assert_equal 99, tri.var - tri.remove + assert_equal 99, tri.remove assert_equal nil, tri.var - assert_raise NameError do - tri.remove - end + assert_raise(NameError) { tri.remove } + assert_raise(NameError) { tri.remove_instance_variable(:var) } end # Kernel#require is defined in mruby-require. '15.3.1.3.42' |
