Method: Set#reset

Defined in:
lib/set.rb

#resetObject

Resets the internal state after modification to existing elements and returns self.

Elements will be reindexed and deduplicated.



702
703
704
705
706
707
708
709
# File 'lib/set.rb', line 702

def reset
  if @hash.respond_to?(:rehash)
    @hash.rehash # This should perform frozenness check.
  else
    raise FrozenError, "can't modify frozen #{self.class.name}" if frozen?
  end
  self
end