End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Integer.each_prime
each_prime(ubound) { |prime| ... }
lib/prime.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/prime.rb, line 122
def Integer.each_prime(ubound, &block) # :yields: prime
Prime.each(ubound, &block)
end
Iterates the given block over all prime numbers.
See Primeeach for more details.