diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-21 00:49:36 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-21 00:49:36 +0000 |
commit | 4e1bea5f5a46ff4c1a067ec280edc5f3da020a3a (patch) | |
tree | fd403a7420b175c8f372a6bf26cf044b360ddaca /lib | |
parent | 4388d98671c7b798500fc622eb7ee903462989ab (diff) |
merge revision(s) 48666: [Backport #10873]
* 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_0_0@49669 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 b1195fdf0b..474a820d1b 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 |