[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02098] Re: Array Gotchas

From: matz@... (Yukihiro Matsumoto)
Date: 2000-03-23 03:31:03 UTC
List: ruby-talk #2098
Hi,

In message "[ruby-talk:02091] Array Gotchas"
    on 00/03/22, "Dat Nguyen" <thucdat@hotmail.com> writes:

|By chance, I also discovered a bug in the manual where it claims the 
|following are the same:
|
|each_index {...}
|(0..ary.size).each {...}
|
|But they aren't. Do you see why?

Besides return values, `..' operator creates a range covers including
right side value.  It should be `...' operator.

Hmm, in Japanese version, it was `(0..(ary.size-1)).each {...}'.

							matz.

In This Thread

Prev Next