Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
438012d
commit 20d55fb
Showing
9 changed files
with
12 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
opal_filter "Array#flatten" do | ||
fails "Array#flatten does not call flatten on elements" | ||
fails "Array#flatten raises an ArgumentError on recursive arrays" | ||
fails "Array#flatten flattens any element which responds to #to_ary, using the return value of said method" | ||
fails "Array#flatten returns subclass instance for Array subclasses" | ||
fails "Array#flatten with a non-Array object in the Array ignores the return value of #to_ary if it is nil" | ||
fails "Array#flatten with a non-Array object in the Array raises a TypeError if the return value of #to_ary is not an Array" | ||
fails "Array#flatten raises a TypeError when the passed Object can't be converted to an Integer" | ||
fails "Array#flatten tries to convert passed Objects to Integers using #to_int" | ||
end | ||
|
||
opal_filter "Array#flatten!" do | ||
fails "Array#flatten! does not call flatten! on elements" | ||
fails "Array#flatten! raises an ArgumentError on recursive arrays" | ||
fails "Array#flatten! flattens any elements which responds to #to_ary, using the return value of said method" | ||
fails "Array#flatten! raises a TypeError when the passed Object can't be converted to an Integer" | ||
fails "Array#flatten! tries to convert passed Objects to Integers using #to_int" | ||
end |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
opal_filter "array" do | ||
fails "The unpacking splat operator (*) when applied to a non-Array value attempts to coerce it to Array if the object respond_to?(:to_a)" | ||
fails "The unpacking splat operator (*) returns a new array containing the same values when applied to an array inside an empty array" | ||
fails "The unpacking splat operator (*) unpacks the start and count arguments in an array slice assignment" | ||
fails "The unpacking splat operator (*) unpacks arguments as if they were listed statically" | ||
end |