Hi,

In message "Re: [ruby-core:23528] Re: [Bug #1487] String#each_char must return self"
    on Sun, 24 May 2009 00:47:19 +0900, Eero Saynatkari <ruby-ml / kittensoft.org> writes:

|I suppose this is true, although I am in the "enough String
|to hang themselves" camp on the matter if someone thinks it
|a good idea to muck with the object being iterated on (and
|not using a mutating iterator.) The user can always do the
|dup themselves.

I'm not sure if I understand what you mean.  Do you mean "since the
users always dup themselves, internal dup is not needed"?  If so, I
disagree, especially this case.  Strings with Multibyte characters are
so easily hindered by modification, and it is not always easy to make
sure strings are not modified in the block.  So if only single object
allocation can save _me_ (copy-on-write is used internally, so no
contents are copied), I'd love to pay the cost.

							matz.