merge sort (ruby)