mergesort in ruby