From: James Britt Date: 2007-07-22T11:44:40+09:00 Subject: Re: Method to return elements of an array in numeric 'rank'? Jenny Purcell wrote: > I would expect there would be an existing method that works off of the > array class that would do this, and I'd like to check on that before > (painfully) writing my own nested loops that would do the same thing. See http://www.ruby-doc.org/core/classes/Enumerable.html#M003151 Look at sort_by Also, in your code, consider representing objects of interest (such as horses and races) by defining suitable classes. I think you code would be easier to follow if, for example, it managed a collection of Horse objects. -- James Britt http://web2.0validator.com - We're the Dot in Web 2.0 http://www.rubyaz.org - Hacking in the Desert http://www.jamesbritt.com - Playing with Better Toys