diff options
author | Benoit Daloze <[email protected]> | 2020-07-27 21:41:08 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-07-27 21:41:08 +0200 |
commit | 126fd5f15cff0d3bf314d90d8c21a3ae25ae8e68 (patch) | |
tree | 33350f7170436c32ed4c8e79f0be2c334c7bc8a9 /spec/ruby/core/array | |
parent | 7429841ab6494b849106e6d3b119f147adfee3b7 (diff) |
Update to ruby/spec@07164da
Diffstat (limited to 'spec/ruby/core/array')
-rw-r--r-- | spec/ruby/core/array/fill_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/ruby/core/array/fill_spec.rb b/spec/ruby/core/array/fill_spec.rb index 96c8862208..6745bc8d09 100644 --- a/spec/ruby/core/array/fill_spec.rb +++ b/spec/ruby/core/array/fill_spec.rb @@ -207,8 +207,9 @@ describe "Array#fill with (filler, index, length)" do not_supported_on :opal do it "raises an ArgumentError or RangeError for too-large sizes" do + error_types = [RangeError, ArgumentError] arr = [1, 2, 3] - -> { arr.fill(10, 1, fixnum_max) }.should raise_error(ArgumentError) + -> { arr.fill(10, 1, fixnum_max) }.should raise_error { |err| error_types.should include(err.class) } -> { arr.fill(10, 1, bignum_value) }.should raise_error(RangeError) end end |