Implemented mergesort in ruby