diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-25 23:19:35 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-25 23:19:35 +0900 |
| commit | 6cf5618b44962a35886629be4782c872e56ae428 (patch) | |
| tree | 49e4da9886692f364bf594c66cee1a7060d08cd9 /test/t/exception.rb | |
| parent | 6d6957078eb56d95af3c729bb172765bf610ef54 (diff) | |
| parent | 84116c26c9eb910a7ccdf9f49172a6c9df9dab2a (diff) | |
| download | mruby-6cf5618b44962a35886629be4782c872e56ae428.tar.gz mruby-6cf5618b44962a35886629be4782c872e56ae428.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'test/t/exception.rb')
| -rw-r--r-- | test/t/exception.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb index 8aa07e813..be487162f 100644 --- a/test/t/exception.rb +++ b/test/t/exception.rb @@ -16,11 +16,14 @@ assert('Exception.exception', '15.2.22.4.1') do end assert('Exception#exception', '15.2.22.5.1') do - e1 = Exception.exception() - e2 = Exception.exception('b') - - assert_equal Exception, e1.class - assert_equal Exception, e2.class + e = Exception.new + re = RuntimeError.new + assert_equal e, e.exception + assert_equal e, e.exception(e) + assert_equal re, re.exception(re) + changed_re = re.exception('message has changed') + assert_not_equal re, changed_re + assert_equal 'message has changed', changed_re.message end assert('Exception#message', '15.2.22.5.2') do |
