End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Set#map!
map!
lib/set.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/set.rb, line 407
def collect!
block_given? or return enum_for(__method__) { size }
set = self.class.new
each { |o| set << yield(o) }
replace(set)
end
Alias of #collect!
Replaces the elements with ones returned by collect(). Returns an enumerator if no block is given.