From: Marc-Andre Lafortune Date: 2009-05-24T05:37:29+09:00 Subject: [ruby-core:23533] Re: [Bug #1487] String#each_char must return self As per Eero Saynatkari's suggestion, my response is: This change was made to bring #each_char in line with all the other #each* methods which all return self, not a copy. It should follow the same pattern unless there is a crucial reason not to, and in that case it must be clearly documented. On Fri, May 22, 2009 at 9:20 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ruby-core:23499] [Bug #1487] String#each_char must return self" > � �on Tue, 19 May 2009 14:27:54 +0900, Marc-Andre Lafortune writes: > > |str.each_char{} currently returns a copy of str. It should return self. This also affects Ruby 1.8.7 > > Before accepting the proposal, could you explain why we _should_ > return the original string? �We haven't defined the return value of > each_char yet. > > � � � � � � � � � � � � � � � � � � � � � � � � � � � �matz. > >