Resets the internal state after modification to existing elements and
returns self.
Elements will be reindexed and deduplicated.
# File lib/set.rb, line 523
def reset
if @hash.respond_to?(:rehash)
@hash.rehash # This should perform frozenness check.
else
raise "can't modify frozen #{self.class.name}" if frozen?
end
self
end