hostname=(v)
Instance Public methods
set the host part of the URI as the argument with
brackets for IPv6 addresses.
This method is same as #host=
except the argument can be bare IPv6 address.
u = URI(âfoo/barâ) p u.to_s
#=> âfoo/barâ u.hostname = â::1â p u.to_s
#=> â[::1]/barâ
If the arugument seems IPv6 address, it is wrapped by brackets.