-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #507 from kostya/first
Enumerable#first
- Loading branch information
Showing
10 changed files
with
29 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,11 +0,0 @@ | |||
fails:Array#first returns the first count elements if given a count | |||
fails:Array#first returns an empty array when passed count on an empty array | |||
fails:Array#first returns an empty array when passed count == 0 | |||
fails:Array#first returns an array containing the first element when passed count == 1 | |||
fails:Array#first returns the entire array when count > length | |||
fails:Array#first returns an array which is independent to the original when passed count | |||
fails:Array#first tries to convert the passed argument to an Integer using #to_int | |||
fails:Array#first raises a TypeError if the passed argument is not numeric | |||
fails:Array#first does not return subclass instance when passed count on Array subclasses | |||
fails:Array#first is not destructive | |||
fails:Array#first | |||
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1 @@ | |||
fails:Enumerable#first returns the first element | |||
fails:Enumerable#first returns nil if self is empty | |||
fails:Enumerable#first when passed an argument returns the first count elements if given a count | |||
fails:Enumerable#first when passed an argument returns an empty array when passed count on an empty array | |||
fails:Enumerable#first when passed an argument returns an empty array when passed count == 0 | |||
fails:Enumerable#first when passed an argument returns an array containing the first element when passed count == 1 | |||
fails:Enumerable#first when passed an argument raises an ArgumentError when count is negative | |||
fails:Enumerable#first when passed an argument returns the entire array when count > length | |||
fails:Enumerable#first when passed an argument tries to convert the passed argument to an Integer using #to_int | |||
fails:Enumerable#first when passed an argument raises a TypeError if the passed argument is not numeric | |||
fails:Enumerable#first when passed an argument gathers whole arrays as elements when each yields multiple | fails:Enumerable#first when passed an argument gathers whole arrays as elements when each yields multiple | ||
fails:Enumerable#first when passed an argument consumes only what is needed |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1 @@ | |||
fails:Enumerable#take when passed an argument tries to convert the passed argument to an Integer using #to_int | |||
fails:Enumerable#take when passed an argument raises a TypeError if the passed argument is not numeric | |||
fails:Enumerable#take when passed an argument gathers whole arrays as elements when each yields multiple | fails:Enumerable#take when passed an argument gathers whole arrays as elements when each yields multiple |
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
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