class Bundler::URI::Generic

def initialize(scheme,


Creates a new Bundler::URI::Generic instance from ``generic'' components without check.

== Description

Check arguments [false by default].
+arg_check+::
Parser for internal use [Bundler::URI::DEFAULT_PARSER by default].
+parser+::
Part of the Bundler::URI after '#' character.
+fragment+::
Query data.
+query+::
Opaque part.
+opaque+::
Path on server.
+path+::
Registry of naming authorities.
+registry+::
Server port.
+port+::
Server host name.
+host+::
User name and password, i.e. 'sdmitry:bla'.
+userinfo+::
Protocol scheme, i.e. 'http','ftp','mailto' and so on.
+scheme+::

== Args
def initialize(scheme,
               userinfo, host, port, registry,
               path, opaque,
               query,
               fragment,
               parser = DEFAULT_PARSER,
               arg_check = false)
  @scheme = nil
  @user = nil
  @password = nil
  @host = nil
  @port = nil
  @path = nil
  @query = nil
  @opaque = nil
  @fragment = nil
  @parser = parser == DEFAULT_PARSER ? nil : parser
  if arg_check
    self.scheme = scheme
    self.userinfo = userinfo
    self.hostname = host
    self.port = port
    self.path = path
    self.query = query
    self.opaque = opaque
    self.fragment = fragment
  else
    self.set_scheme(scheme)
    self.set_userinfo(userinfo)
    self.set_host(host)
    self.set_port(port)
    self.set_path(path)
    self.query = query
    self.set_opaque(opaque)
    self.fragment=(fragment)
  end
  if registry
    raise InvalidURIError,
      "the scheme #{@scheme} does not accept registry part: #{registry} (or bad hostname?)"
  end
  @scheme&.freeze
  self.set_path('') if !@path && !@opaque # (see RFC2396 Section 5.2)
  self.set_port(self.default_port) if self.default_port && !@port
end