On Mar 23, 2008, at 1:24 PM, Vladimir Sizikov wrote:

> In some cases, there is no difference (e.g., for Fixnums, 4 succ's
> equivalent to +4).
> But in case of, say, Strings, iterating via #succ makes perfect sense,
> but it's nonsensical to add 4 to the string.
> In other case, Floats and Rationals, there is no sense in #succ, but
> increments are perfectly valid and have some valid meaning.


Here's how this week's beta of the PickAxes describes it:

     \begin{method}{step}{\self.step( \obj{n}=1 )
          \opt{\blockp{obj}} \returns{\self{} or \obj{enum}}}{A} 
\newin{1.9}%
        Iterates over \self, passing each $n^{th}$ element to the
        block. If the range contains numbers, addition by one is used
        to generate
        successive elements.
        Otherwise \METHOD{step} invokes \METHOD{succ}
        to iterate through range elements. If no block is given,
        an enumerator is returned. The following code uses
        class \C{Xs} defined at the start of this section.


This seems to cover the cases.

But, I agree. This is a bit of a mess. (As is Enumerable#member?#)


Dave