p [3, 1, 4, 1, 5].uniq.sort.reverse
Standard input is empty
[5, 4, 3, 1]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!