HI,
On Wed, Mar 26, 2008 at 4:59 PM, Yukihiro Matsumoto
<matz ruby-lang.org> wrote:
> |Anyone from core team to clarify? There is some
activity in JRuby to
> |update the Range#step behavior and we'd like to know
which way to go.
>
> I think 1.8 should not change its behavior, so p111
step behavior
> should be reverted.
Most excellent, so the MRI 1.8.6 behavior should be the same
as in
patchlevel 111, our "golden compatibility target"
for the moment,
that's what we needed to know for now. And that's what
"rubyspecs"
enforce for now.
> The rest should be discussed. I had a reason for the
behavior, but
> I now feel that Range#step should be compatible with
Numeric#step if
> the edge values are numeric.
Interesting, so this approach is from
"incrementing" point of view,
while the curent docs for both 1.8.6 and 1.9 (and in Dave's
book) are
from iterating point of view.
What about negative step values? Numeric#step allows them,
but for
Range that would be a very new behavior.
Thanks,
--Vladimir
|