An implementation of bubble sorting numbers in a ruby method