Compute the median in the Ruby script.