From: Steve Peters Date: 2002-09-19T08:38:06+09:00 Subject: Re: A newbie question for using sort Florian Frank wrote: > Am 2002-09-18 12:09:04 +0900 schrieb Steve Peters: > >> If anyone can let me know what I'm doing wrong, I'd appreciate it. > > > arr.sort doesn't change the order of arr but returns a new array with > arr's elements which happens to be sorted. If you want to sort arr > itself you have to use arr.sort! instead of arr.sort. You could also > use the return value of arr.sort: > > for atom in arr.sort > print atom, "\n" > end > Thanks, this helped!