# File multiset.rb, line 196
  def replace(other)
    @items.clear
    other.each_pair do |item, count|
      self.renew_count(item, count)
    end
    self
  end