summaryrefslogtreecommitdiff
path: root/lib/uri
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 17:36:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 17:36:54 +0000
commite1606f920b17b6ab7a325b3b803ca201d1a18843 (patch)
treeb0a24c6b509cbc4d73bdf7803c7d723ae561199d /lib/uri
parent7f411d6ed4b77c6ce60beae84573e9fb4dca912a (diff)
* lib/uri/generic.rb (URI::Generic.build):
use hostname= to detect and wrap IPv6 hosts. Build is accepting URI components and users may not expect that a host component needs to be wrapped with square brackets since it's not providing a URI. Note: initialize with arg_check => true does not wrap IPv6 hosts. by Joe Rafaniello <jrafanie@redhat.com> https://github.com/ruby/ruby/pull/765 fix GH-765 * test/uri/test_generic.rb: Add more tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri')
-rw-r--r--lib/uri/generic.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index 730230c205..c0b94a84fe 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -184,7 +184,7 @@ module URI
if arg_check
self.scheme = scheme
self.userinfo = userinfo
- self.host = host
+ self.hostname = host
self.port = port
self.path = path
self.query = query