From: "Hal E. Fulton" Date: 2002-07-09T04:49:22+09:00 Subject: Re: is there a better string.each? ----- Original Message ----- From: "Tobias Reif" To: "ruby-talk ML" Sent: Monday, July 08, 2002 2:41 PM Subject: Re: is there a better string.each? > so what about a simple RCR, asking for > > String#chars > , so that we can do > 'foo'.chars #> ["f","o","o"] > and > 'foo'.chars.each do |char| > perhaps plus String#each_char? Better perhaps to try it in Ruby awhile fbefore making an RCR: class String def chars self.split("") end def each_char self.each_byte {|b| yield b.chr } end end Hal Fulton