From: Robert Klemme Date: 2004-01-06T22:46:43+09:00 Subject: Re: rub 1.8.1 and $= "Patrick Gundlach" schrieb im Newsbeitrag news:m2r7yd1cbl.fsf@levana.de... > Hello out there, > > I have the following code to sort an array: > > def Myclass > def sort > # $= =false => case sensitive > oldequal=$= > $= =1 > @allcmds.sort! > $= =oldequal > end > end > > And ruby 1.8.1 gives me a warning, that setting $= is deprecated. How > should I rather do the case insensitive sort? > > Patrick class Myclass def sort @allcmds.sort! {|a,b| a.casecmp b} end end robert