# File lib/dnsruby/message/section.rb, line 79
  def remove_rrset(name, type)
    #  Remove all RRs with the name and type from the section.
    #  Need to worry about header counts here - can we get Message to
    #  update the counts itself, rather than the section worrying about it?
    rrs_to_delete = []
    each do |rr|
      next if rr.rr_type == Types::OPT
      if (rr.name.to_s.downcase == name.to_s.downcase) &&
          ((rr.type == type) ||
              ((rr.type == Types::RRSIG) && (rr.type_covered == type)))
        rrs_to_delete.push(rr)
      end
    end
    rrs_to_delete.each { |rr| delete(rr) }
    @msg.update_counts if @msg
  end