Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/array/fill_tags.txt

This file was deleted.

6 changes: 4 additions & 2 deletions truffle/src/main/ruby/core/array.rb
Original file line number Diff line number Diff line change
@@ -367,6 +367,8 @@ def fill_internal(a=undefined, b=undefined, c=undefined)
if two and !undefined.equal?(two)
begin
right = Rubinius::Type.coerce_to_collection_length two
rescue ArgumentError
raise RangeError, "bignum too big to convert into `long"
rescue TypeError
raise ArgumentError, "second argument must be a Fixnum"
end
@@ -381,8 +383,8 @@ def fill_internal(a=undefined, b=undefined, c=undefined)
right = size
end

if right.is_a?(Bignum)
raise RangeError, "bignum too big to convert into `long'"
if left >= Fixnum::MAX || right > Fixnum::MAX
raise ArgumentError, "argument too big"
end

i = left

0 comments on commit b076b5b

Please sign in to comment.