In last line I write following

puts first_n_primes(-1)

than

puts first_n_primes(1.5)

with this parametr I get the answer

but

puts first_n_primes(a) and puts first_n_primes(‘a’ )

I receive no answer only infinite loop

this means that n.is_a? Integer

working not in that way that we want

I puts in lines 9, 10

following

prime_array ||= []

puts prime_array

with

puts first_n_primes(1)

in last line I get [] in the screen and infinite loop later So - infinite loop - somewhere here

prime = Prime.new

for num in (1…n)

prime_array.push(prime.next)

end

return prime_array