Add a 3rd solution with ruby