lib/primes_table.rb
def first_prime_numbers(num)
    list = []
    prime = 2
    num.times do
      list << prime
      prime = prime.next_prime
    end
    list
  end
#Returns an array with the first +num+ prime numbers
Returns an array with the first +num+ prime numbers
Returns an array with the first + num + prime numbers
def first_prime_numbers(num)
    list = []
    prime = 2
    num.times do
      list << prime
      prime = prime.next_prime
    end
    list
  end
def first_prime_numbers ( num ) list = [ ] prime = 2 num . times do list << prime prime = prime . next_prime end list end
Returns an array with the first +num+ prime numbers
Returns an array with the first + num + prime numbers
num