From e1606f920b17b6ab7a325b3b803ca201d1a18843 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 1 Dec 2014 17:36:54 +0000 Subject: * 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 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 --- lib/uri/generic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/uri/generic.rb') 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 -- cgit v1.2.3