Reverse engineered the sort method!
A couple of fun Ruby exercises...