summaryrefslogtreecommitdiffhomepage
path: root/test/t/argumenterror.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-05-28 15:46:10 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2012-05-28 15:46:10 -0700
commit2d73abd84405b5096d367bd6654907ae5d9905dc (patch)
treeb0e0ecd589ae7bb58ac4805bf3c4e802fff85a5e /test/t/argumenterror.rb
parentec3944d9c05fc5553469375661dbdaba42a57303 (diff)
parentb19575e5ac1e15c83797a0d8974bc4cc02b83fe6 (diff)
downloadmruby-2d73abd84405b5096d367bd6654907ae5d9905dc.tar.gz
mruby-2d73abd84405b5096d367bd6654907ae5d9905dc.zip
Merge pull request #202 from bovi/add-docu
Add Test Cases (Literals, Enumerable, Exceptions, misc)
Diffstat (limited to 'test/t/argumenterror.rb')
-rw-r--r--test/t/argumenterror.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/t/argumenterror.rb b/test/t/argumenterror.rb
index be1dec974..ca998f8de 100644
--- a/test/t/argumenterror.rb
+++ b/test/t/argumenterror.rb
@@ -2,6 +2,14 @@
# ArgumentError ISO Test
assert('ArgumentError', '15.2.24') do
- ArgumentError.class == Class
-end
+ e2 = nil
+ a = []
+ begin
+ # this will cause an exception due to the wrong arguments
+ a[]
+ rescue => e1
+ e2 = e1
+ end
+ ArgumentError.class == Class and e2.class == ArgumentError
+end