From: matz@... (Yukihiro Matsumoto) Date: 2004-01-07T00:52:28+09:00 Subject: Re: rub 1.8.1 and $= Hi, In message "Re: rub 1.8.1 and $=" on 04/01/07, Patrick Gundlach writes: |> 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. FYI, this also work class Myclass def sort @allcmds.sort_by{|x| x.upcase} end end Note "sort_by" do not modify @allcmds. matz.