method
check_port
check_port(v)
private
Hide source
# File lib/uri/generic.rb, line 402 def check_port(v) return v unless v if @registry || @opaque raise InvalidURIError, "can not set port with registry or opaque" elsif !v.kind_of?(Fixnum) && PORT !~ v raise InvalidComponentError, "bad component(expected port component): #{v}" end return true end