the problem occurs when I put the inputs (n1, n2) and the console still request me for more inputs.
my code:
#!/usr/bin/env ruby
def Euclides(n1,n2)
while n1 % n2 != 0
aux = n1
n1 = n2
n2 = aux % n2
end
return n2
end
n1 = gets
n2 = gets
puts Euclides(n1,n2)
gets, I just tested. Your code is falling infinite loop, thus it seems to you. Just putputs 123before the loop, you can see that, control goes there.