def next_prime_number (last_known_prime)
while true
last_known_prime++
found_factor = false # ERROR
for i in 1...last_known_prime
if last_known_prime % i == 0
found_factor = true
break
end
end
if !found_factor
puts "new prime: #{last_known_prime}"
Kernel.exit
end
end
end
in `next_prime_number': undefined method `+@' for false:FalseClass (NoMethodError)
I'm getting the above error and am totally stumped. Any ideas (no, this is not homework, I am trying to teach myself Ruby through the Euler Project).