On 8/11/07, dblack / rubypal.com <dblack / rubypal.com> wrote:
> > s = "ZBBBCZZ"
> > x = s.split('').group_by{|x| x}.entries
> >
> > or possibly to
> >
> > x = s.split('').group_by.entries
>
> I'm going to have to get special glasses that can read invisible
> ink.... :-)

whoops, sorry =)
that should be

fr
   x = s.split('').group_by{|x| x}.entries.map{|x| x.join}

to
   x = s.split('').group_by.entries.map{|x| x.join}

i assume that group_by without a block would group the elements by
themselves. maybe i should name it group not group_by   :)

kind regards -botp