From: dblack@... Date: 2006-10-20T05:50:06+09:00 Subject: Re: String not enumerable, what about IO? (was Re: Symbol < String in Ruby > 1.8) Hi -- On Fri, 20 Oct 2006, Austin Ziegler wrote: > On 10/19/06, dblack@wobblini.net wrote: >> I still think the naming is very unexpected. I know it's >> old-fashioned and naive to expect "things" to be a collection of >> things :-) But I really do have that expectation. > > What about: > > String#by_chars > String#by_lines > String#by_bytes > > That would seem to allow for either an enumerator or a block. My initial impression is that that's a great idea. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org