summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/deps/mruby/test/t/argumenterror.rb
blob: abb53429b0949a75feb879bc5d0048484a758746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
##
# 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

  assert_equal(Class, ArgumentError.class)
  assert_equal(ArgumentError, e2.class)
end