From: Yukihiro Matsumoto Date: 2009-05-24T00:34:35+09:00 Subject: [ruby-core:23527] Re: [Bug #1487] String#each_char must return self Hi, In message "Re: [ruby-core:23526] Re: [Bug #1487] String#each_char must return self" on Sun, 24 May 2009 00:00:52 +0900, Eero Saynatkari writes: |> I was hoping for a little bit of consistency as well. | |Also true for Array#each and so on. Whichever way it goes, |they should all be the same. | |Philosophically, returning self from a non-mutating iterator |is the most straightforward thing to do and makes it possible |to avoid the cost of the dup. The string may be modified in the block, so that you cannot avoid the cost of the dup in this case. OK, consistency is the reason? What else? matz.