mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@07164da
This commit is contained in:
parent
7429841ab6
commit
126fd5f15c
38 changed files with 733 additions and 44 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue