diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/prime.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/prime.rb b/lib/prime.rb index ef0784a385..d361e96720 100644 --- a/lib/prime.rb +++ b/lib/prime.rb @@ -436,9 +436,8 @@ class Prime end end - segment.each do |prime| - @primes.push prime unless prime.nil? - end + @primes.concat(segment.compact!) + @max_checked = segment_max end end |