insertion sort in ruby