Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions corelib/array.rb
Original file line number Diff line number Diff line change
@@ -323,6 +323,8 @@ def assoc(object)
end

def at(index)
index = Opal.coerce_to index, Integer, :to_int

%x{
if (index < 0) {
index += #{self}.length;
2 changes: 0 additions & 2 deletions spec/filters/bugs/array.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
opal_filter "Array" do
fails "Array#at raises a TypeError when the passed argument can't be coerced to Integer"

fails "Array#clone copies singleton methods"
fails "Array#clone creates a new array containing all elements or the original"

0 comments on commit 9e531e9

Please sign in to comment.