"Patrick Gundlach" <clr1.10.randomuser / spamgourmet.com> schrieb im
Newsbeitrag news:m2n09117n1.fsf / levana.de...
> Hello Robert,
>
> > class Myclass
> >   def sort
> >     @allcmds.sort! {|a,b| a.casecmp b}
> >   end
> > end
>
> Oh, that's new in 1.8.0. I'll read the news section more carefully
> next time. Thank you for pointing out casecmp.

With older versions you can use

@allcmds.sort! {|a,b| a.upcase <=> b.upcase}

Regards

    robert