class Bundler::URI::MailTo

def check_to(v)

Checks the to +v+ component.
def check_to(v)
  return true unless v
  return true if v.size == 0
  v.split(/[,;]/).each do |addr|
    # check url safety as path-rootless
    if /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*\z/ !~ addr
      raise InvalidComponentError,
        "an address in 'to' is invalid as Bundler::URI #{addr.dump}"
    end
    # check addr-spec
    # don't s/\+/ /g
    addr.gsub!(/%\h\h/, Bundler::URI::TBLDECWWWCOMP_)
    if EMAIL_REGEXP !~ addr
      raise InvalidComponentError,
        "an address in 'to' is invalid as uri-escaped addr-spec #{addr.dump}"
    end
  end
  true
end