From: Brad Phelan Date: 2007-08-14T14:29:57+09:00 Subject: Re: Split a string based on change of character Pe�a wrote: > From: Logan Capaldo [mailto:logancapaldo@gmail.com] > # On 8/13/07, Brad Phelan wrote: > # > Enumerator.new(s, :scan, /(.)\1*/).map {$&} > # What's wrong with s.enum_for(:scan, /(.)\1*/).map { $& } ? > > somehow i missed the enumerator hack. thank you logan and brad for the update. > kind regards -botp > Hey cool .. 'enum_for' exactly what I was looking for. I couldn't understand why it didn't exist and it does. Scratch my suggestion for 'enum_scan'. B