On Saturday, July 19, 2003, at 02:23  PM, Kurt M. Dresner wrote:
>> The main problem here is that Array#to_s calls join with the default
>> field separator, which for some reason is "".  To me, this isn't
>> intuitive.  Is there some historical reason why this behavior exists?
>> Even less intuitive to me is Hash#to_s, because the way the conversion
>> is done you lose any concept it was a hash.
>
> It's intuitive because it's the opposite of taking a string and putting
> each character as an element of an array.
>
> "foobar" -> ['f','o','o','b','a','r'] -> "foobar"
>

Aha!  So that's it.  But that means it's intuitive to people who think 
of strings as character arrays.  For people who have always though of 
Strings as objects rather than arrays, it's less intuitive.  Also, for 
the vast majority of arrays which don't contain characters the behavior 
isn't expected.

What about the Hash#to_s method?

Ben