diff options
| author | Masaki Muranaka <[email protected]> | 2013-04-04 16:26:30 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-04-04 16:26:30 +0900 |
| commit | ea93ac13fa94d42cb17600d223ba41f86c21cb94 (patch) | |
| tree | 5827b8f4cca1f38ce410b2c4501c857b3d3ac25a /test | |
| parent | edd0a621064e45786bf4ba23ca7c6f71a8933c49 (diff) | |
| download | mruby-ea93ac13fa94d42cb17600d223ba41f86c21cb94.tar.gz mruby-ea93ac13fa94d42cb17600d223ba41f86c21cb94.zip | |
Add test for NameError#name
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/nameerror.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/t/nameerror.rb b/test/t/nameerror.rb index 8e57ac18b..407fe7a95 100644 --- a/test/t/nameerror.rb +++ b/test/t/nameerror.rb @@ -9,7 +9,19 @@ assert('NameError superclass', '15.2.31.2') do NameError.superclass == StandardError end -# TODO 15.2.31.2.1 NameError#name +assert('NameError#name', '15.2.31.2.1') do + + # This check is not duplicate with 15.2.31.2.2 check. + # Because the NameError in this test is generated in + # C API. + class TestDummy + alias foo bar + rescue NameError => e + $test_dummy_result = e.name + end + + $test_dummy_result == :bar +end assert('NameError#initialize', '15.2.31.2.2') do e = NameError.new.initialize('a') |
