On 2002.07.05, Tom Sawyer <transami / transami.net> wrote:
> a = "canada"
> a.each_byte do |i|
>   puts i.chr
> end
> 
> thought it was strange myself. personally i'd like it if String and
> Array where a little more in harmony.

A String is a string.  An Array is an array.  Any coincidence that
a String is an array of characters doesn't mean that a String
converted to an Array should yield an array of characters.  You
have String#split for that.

> in c/c++ strings are arrays, arn't they?

Thank goodness Ruby fixed this mistake.  ;-)

-- Dossy

-- 
Dossy Shiobara                       mail: dossy / panoptic.com 
Panoptic Computer Network             web: http://www.panoptic.com/ 
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)