Re.split Hackerrank Solution In Ruby