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 #663 from topazproject/tim/Range#step
copy Range#step from Rubinius
- Loading branch information
Showing
with
57 additions
and 42 deletions.
- +57 −0 lib-topaz/range.rb
- +0 −42 spec/tags/core/range/step_tags.txt
@@ -1,44 +1,2 @@ | ||
fails:Range#step returns an enumerator when no block is given | ||
fails:Range#step returns self | ||
fails:Range#step raises TypeError if step | ||
fails:Range#step calls #to_int to coerce step to an Integer | ||
fails:Range#step raises a TypeError if step does not respond to #to_int | ||
fails:Range#step raises a TypeError if #to_int does not return an Integer | ||
fails:Range#step coerces the argument to integer by invoking to_int | ||
fails:Range#step raises a TypeError if the first element does not respond to #succ | ||
fails:Range#step raises an ArgumentError if step is 0 | ||
fails:Range#step raises an ArgumentError if step is 0.0 | ||
fails:Range#step raises an ArgumentError if step is negative | ||
fails:Range#step with inclusive end and Integer values yields Integer values incremented by 1 and less than or equal to end when not passed a step | ||
fails:Range#step with inclusive end and Integer values yields Integer values incremented by an Integer step | ||
fails:Range#step with inclusive end and Integer values yields Float values incremented by a Float step | ||
fails:Range#step with inclusive end and Float values yields Float values incremented by 1 and less than or equal to end when not passed a step | ||
fails:Range#step with inclusive end and Float values yields Float values incremented by an Integer step | ||
fails:Range#step with inclusive end and Float values yields Float values incremented by a Float step | ||
fails:Range#step with inclusive end and Float values returns Float values of 'step * n + begin <= end' | ||
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by 1 and less than or equal to end when not passed a step | ||
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by an Integer step | ||
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by a Float step | ||
fails:Range#step with inclusive end and Float, Integer values yields Float values incremented by 1 and less than or equal to end when not passed a step | ||
fails:Range#step with inclusive end and Float, Integer values yields Float values incremented by an Integer step | ||
fails:Range#step with inclusive end and Float, Integer values yields Float values incremented by a Float step | ||
fails:Range#step with inclusive end and String values yields String values incremented by #succ and less than or equal to end when not passed a step | ||
fails:Range#step with inclusive end and String values yields String values incremented by #succ called Integer step times | ||
fails:Range#step with inclusive end and String values raises a TypeError when passed a Float step | ||
fails:Range#step with inclusive end and String values calls #succ on begin and each element returned by #succ | ||
fails:Range#step with exclusive end and Integer values yields Integer values incremented by 1 and less than end when not passed a step | ||
fails:Range#step with exclusive end and Integer values yields Integer values incremented by an Integer step | ||
fails:Range#step with exclusive end and Integer values yields Float values incremented by a Float step | ||
fails:Range#step with exclusive end and Float values yields Float values incremented by 1 and less than end when not passed a step | ||
fails:Range#step with exclusive end and Float values yields Float values incremented by an Integer step | ||
fails:Range#step with exclusive end and Float values yields Float values incremented by a Float step | ||
fails:Range#step with exclusive end and Float values returns Float values of 'step * n + begin < end' | ||
fails:Range#step with exclusive end and Integer, Float values yields Float values incremented by 1 and less than end when not passed a step | ||
fails:Range#step with exclusive end and Integer, Float values yields Float values incremented by an Integer step | ||
fails:Range#step with exclusive end and Integer, Float values yields an Float and then Float values incremented by a Float step | ||
fails:Range#step with exclusive end and Float, Integer values yields Float values incremented by 1 and less than end when not passed a step | ||
fails:Range#step with exclusive end and Float, Integer values yields Float values incremented by an Integer step | ||
fails:Range#step with exclusive end and Float, Integer values yields Float values incremented by a Float step | ||
fails:Range#step with exclusive end and String values yields String values incremented by #succ and less than or equal to end when not passed a step | ||
fails:Range#step with exclusive end and String values yields String values incremented by #succ called Integer step times | ||
fails:Range#step with exclusive end and String values raises a TypeError when passed a Float step |