[ ['d',100], ['c',200], ['b',50], ['a',100] ].sort_by {|ns| [ ns.last, ns.first ]} => [["b", 50], ["a", 100], ["d", 100], ["c", 200]]
An array compares on its elements.
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com
[ ['d',100], ['c',200], ['b',50], ['a',100] ].sort_by {|ns| [ ns.last, ns.first ]} => [["b", 50], ["a", 100], ["d", 100], ["c", 200]]
An array compares on its elements.
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com