What's the problem in this ruby code?? I searched any END missing, but I don't see nothing. Please, anyone help me...
def isPrime(intNumber)
divisores = []
aux = intNumber
i = 2
while i<=aux/i
if aux % i == 0
while aux % i == 0
aux = aux / i
end
divisores << i
i++
end
end
divisores << aux if aux!=1 and aux!=intNumber
return aux
end
valor = isPrime(6)
puts "saida #{valor}"