The following code is what I have refactored for this exercise. I get a syntax error. What is wrong with my unless and/or if statements here?

$VERBOSE = nil # We'll explain this at the end of the lesson.

require 'prime' # This is a module. We'll cover these soon!

def first_n_primes(n)

puts "n must be an integer." unless Integer

end

puts "n must be greater than 0." if n <= 0

end

prime_array ||= []

prime = Prime.new

for num in (1..n)

prime_array.push(prime.next)

end

return prime_array

end

first_n_primes(10)