sorting problem

This is straight from the Ruby documentation. Without knowing anything about the type of objects you're trying to sort, I can't be of any more help.