sort « Array « Ruby






1.apply the sort (or sort!, for in-place changes)
2.Get the top 5 elements
3.Get the bottom 5 elements
4.ArgumentError: comparison of Fixnum with String failed
5.Sort object array by object attribute