A follow-up: > -------------------------------------------------- > require 'pp' > > h= {"Team A"=>{:a=>3, :b=>2, :c=>6, :d=>114 }, > "Team B"=>{:a=>0, :b=>-2, :c=>4, :d=>112 }, > "Team C"=>{:a=>3, :b=>4, :c=>4, :d=>110 }, > "Team D"=>{:a=>3, :b=>4, :c=>4, :d=>108 }, > } this seems to be stable: pp h.sort{ |a,b| res = a[1][:a] <=> b[1][:a] if res == 0 res = a[1][:b] <=> b[1][:b] end if res == 0 res = a[1][:c] <=> b[1][:c] end if res == 0 res = a[1][:d] <=> b[1][:d] end res }.reverse But I still would like to know if sort_by is unstable (or if am I doing something wrong). Patrick