diff options
Diffstat (limited to 'spec/ruby/core/array/shared/slice.rb')
-rw-r--r-- | spec/ruby/core/array/shared/slice.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/array/shared/slice.rb b/spec/ruby/core/array/shared/slice.rb index d6b4547b2b..f36890fa4e 100644 --- a/spec/ruby/core/array/shared/slice.rb +++ b/spec/ruby/core/array/shared/slice.rb @@ -466,6 +466,12 @@ describe :array_slice, shared: true do obj = 8e19 -> { array.send(@method, obj) }.should raise_error(RangeError) + + # boundary value when longs are 64 bits + -> { array.send(@method, 2.0**63) }.should raise_error(RangeError) + + # just under the boundary value when longs are 64 bits + array.send(@method, max_long.to_f.prev_float).should == nil end it "raises a RangeError when the length is out of range of Fixnum" do |