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 #493 from obolzer/String#upto
Implement String#upto and fix String#succ
- Loading branch information
Showing
with
30 additions
and 14 deletions.
@@ -1,3 +1,2 @@ | ||
fails:String#succ increases the next best alphanumeric (jumping over non-alphanumerics) if there is a carry | ||
fails:String#succ returns subclass instances when called on a subclass | ||
fails:String#succ! raises a RuntimeError if self is frozen |
@@ -1,13 +1 @@ | ||
fails:String#upto passes successive values, starting at self and ending at other_string, to the block | ||
fails:String#upto calls the block once even when start eqals stop | ||
fails:String#upto doesn't call block with self even if self is less than stop but stop length is less than self length | ||
fails:String#upto doesn't call block if stop is less than self and stop length is less than self length | ||
fails:String#upto doesn't call the block if self is greater than stop | ||
fails:String#upto stops iterating as soon as the current value's character count gets higher than stop's | ||
fails:String#upto returns self | ||
fails:String#upto tries to convert other to string using to_str | ||
fails:String#upto raises a TypeError if other can't be converted to a string | ||
fails:String#upto does not work with symbols | ||
fails:String#upto returns an enumerator when no block given | ||
fails:String#upto uses the ASCII map for single letters | ||
fails:String#upto stops before the last value if exclusive |