Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #552 from kostya/minmax2
Enumerable, Array#minmax
- Loading branch information
Showing
with
79 additions
and 72 deletions.
- +0 −8 lib-topaz/array.rb
- +50 −14 lib-topaz/enumerable.rb
- +0 −6 spec/tags/core/enumerable/max_by_tags.txt
- +0 −3 spec/tags/core/enumerable/max_tags.txt
- +0 −6 spec/tags/core/enumerable/min_by_tags.txt
- +0 −3 spec/tags/core/enumerable/min_tags.txt
- +0 −6 spec/tags/core/enumerable/minmax_by_tags.txt
- +0 −4 spec/tags/core/enumerable/minmax_tags.txt
- +5 −0 topaz/modules/topaz.py
- +2 −15 topaz/objects/arrayobject.py
- +7 −7 topaz/objects/objectobject.py
- +15 −0 topaz/objspace.py
@@ -1,7 +1 @@ | ||
fails:Enumerable#max_by returns an enumerator if no block | ||
fails:Enumerable#max_by returns nil if #each yields no objects | ||
fails:Enumerable#max_by returns the object for whom the value returned by block is the largest | ||
fails:Enumerable#max_by returns the object that appears first in #each in case of a tie | ||
fails:Enumerable#max_by uses max.<=>(current) to determine order | ||
fails:Enumerable#max_by is able to return the maximum for enums that contain nils | ||
fails:Enumerable#max_by gathers whole arrays as elements when each yields multiple |
@@ -1,4 +1 @@ | ||
fails:Enumerable#max raises an ArgumentError for incomparable elements | ||
fails:Enumerable#max return the maximum element (with block | ||
fails:Enumerable#max returns the minimum for enumerables that contain nils | ||
fails:Enumerable#max gathers whole arrays as elements when each yields multiple |
@@ -1,7 +1 @@ | ||
fails:Enumerable#min_by returns an enumerator if no block | ||
fails:Enumerable#min_by returns nil if #each yields no objects | ||
fails:Enumerable#min_by returns the object for whom the value returned by block is the largest | ||
fails:Enumerable#min_by returns the object that appears first in #each in case of a tie | ||
fails:Enumerable#min_by uses min.<=>(current) to determine order | ||
fails:Enumerable#min_by is able to return the maximum for enums that contain nils | ||
fails:Enumerable#min_by gathers whole arrays as elements when each yields multiple |
@@ -1,4 +1 @@ | ||
fails:Enumerable#min raises an ArgumentError for incomparable elements | ||
fails:Enumerable#min return the minimun when using a block rule | ||
fails:Enumerable#min returns the minimum for enumerables that contain nils | ||
fails:Enumerable#min gathers whole arrays as elements when each yields multiple |
@@ -1,7 +1 @@ | ||
fails:Enumerable#minmax_by returns an enumerator if no block | ||
fails:Enumerable#minmax_by returns nil if #each yields no objects | ||
fails:Enumerable#minmax_by returns the object for whom the value returned by block is the largest | ||
fails:Enumerable#minmax_by returns the object that appears first in #each in case of a tie | ||
fails:Enumerable#minmax_by uses min/max.<=>(current) to determine order | ||
fails:Enumerable#minmax_by is able to return the maximum for enums that contain nils | ||
fails:Enumerable#minmax_by gathers whole arrays as elements when each yields multiple |
@@ -1,5 +1 @@ | ||
fails:Enumerable#minmax min should return the minimum element | ||
fails:Enumerable#minmax returns [nil, nil] for an empty Enumerable | ||
fails:Enumerable#minmax raises an ArgumentError when elements are incomparable | ||
fails:Enumerable#minmax return the minimun when using a block rule | ||
fails:Enumerable#minmax gathers whole arrays as elements when each yields multiple |