On Sun, 06 Jan 2008 13:11:02 -0500, soprano wrote:

> Yes, I see how to sort an array, but that will produce (unless I am
> mistaken):
> 
> [
>   [1, { :name => "A", :points => 30 }], [2, { :name => "B", :points =>
>   20 }], [3, { :name => "D", :points => 20 }], [4, { :name => "C",
>   :points => 10 }]
> ]
> 
> and I want to account for ties (in points).

Assuming you have the array above after sorting, make a pass across it as 
follows:

a.times do |n|
  a[n][0]=a[n-1][0] if a[n][1][:points]==a[n-1][1][:points]
end



-- 
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/