Tom Sawyer <transami / transami.net> writes:

> thought it was strange myself. personally i'd like it if String and
> Array where a little more in harmony. in c/c++ strings are arrays, arn't
> they?

Perhaps it might be better to say that (currently) the implementation
of Strings is reminiscent of Arrays. However, I'm not sure that this
is a fundamental property of strings, so saying that "strings are
arrays" might be too strong.

Having said that, I'd personally prefer

   str.each       - returns the characters of str as strings

   str.each_byte  - returns the characters/bytes of str
                    (depending on Ruby version)

   str.each_line  - like the current str#each

But the change to #each would probably break a lot of code...



Dave