Primes of number in Ruby