diff options
Diffstat (limited to 'test/t/argumenterror.rb')
| -rw-r--r-- | test/t/argumenterror.rb | 12 |
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 |
