diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-09 13:00:13 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-09 13:00:13 +0000 |
commit | 2d5f7e5e17ef2a05b4218d7a889453897afa72be (patch) | |
tree | 657f8979709a9ca347e7218554f7f3ef00f34779 /lib | |
parent | 3457be5f12b950953f10b5685316fa86a9ac466c (diff) |
merge revision(s) r48666: [Backport #10875]
* 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/branches/ruby_2_1@49907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uri/generic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 88c96fe90a..d7a55dcbd8 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -192,7 +192,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 |