From: matz@... (Yukihiro Matsumoto) Date: 2002-07-08T10:04:23+09:00 Subject: Re: is there a better string.each? Hi, In message "Re: is there a better string.each?" on 02/07/08, Tom Sawyer writes: |the only point i am trying to make is that in so far as both account for |order and list, i want their exposed methodologies to be the same. |that's it. (whihc is why .each should work differently) * a string is not an array. * but still, a string can be seen as an array of characters sometimes, hence str[0] returns the first character (a byte in the current implementation) in the string. * text processing model of Ruby is besed on lines, not characters. That's why I made "each" to be line oriented, not character oriented. I took usefulness over consisitency here. So, if you want String consistent with Array, you need to express either: * why it is important over usefulness * or line-oriented "each" is not usefull at all good enough to bring incompatibility. matz.