End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Prime::PseudoPrimeGenerator#with_object
with_object(obj) { |prime, obj| ... }
lib/prime.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/prime.rb, line 395
def with_object(obj)
return enum_for(:with_object, obj) { Float::INFINITY } unless block_given?
each do |prime|
yield prime, obj
end
end