Merge sort in Ruby