class Bundler::URI::Generic
def check_host(v)
with a host component defined.
Can not have a registry or opaque component defined,
and against the Bundler::URI::Parser Regexp for :HOST.
Checks the host +v+ component for RFC2396 compliance
def check_host(v) return v unless v if @opaque raise InvalidURIError, "can not set host with registry or opaque" elsif parser.regexp[:HOST] !~ v raise InvalidComponentError, "bad component(expected host component): #{v}" end return true end