Merge sort implemented in ruby