From: Li Chen Date: 2006-12-06T09:17:45+09:00 Subject: Re: Can't sort array > > Since you want to sort by method name, give a block to sort, i.e.: > > p m.sort{|a| a.name <=> b.name} The line above doesn't work but it will work if change to the follows p m.sort{|a,b| a.name <=> b.name} Li -- Posted via http://www.ruby-forum.com/.