summaryrefslogtreecommitdiffhomepage
path: root/test/t/argumenterror.rb
blob: ca998f8def722d6377ed85f9b5247aa7df985821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
##
# ArgumentError ISO Test

assert('ArgumentError', '15.2.24') do
  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