Index: doc/ChangeLog-2.4.0 =================================================================== --- doc/ChangeLog-2.4.0 (revision 56928) +++ doc/ChangeLog-2.4.0 (working copy) @@ -1,3 +1,8 @@ +Tue Nov 29 15:07:31 2016 Mohamed Osama + + * lib/net/http/generic_request.rb: Throw ArgumentError if hostname is + not provided in URI + Mon Nov 7 00:32:45 2016 NAKAMURA Usaku * test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint): Index: lib/net/http/generic_request.rb =================================================================== --- lib/net/http/generic_request.rb (revision 56928) +++ lib/net/http/generic_request.rb (working copy) @@ -15,6 +15,7 @@ if URI === uri_or_path then @uri = uri_or_path.dup + raise ArgumentError, "no host component for URI" unless @uri.hostname host = @uri.hostname.dup host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port @path = uri_or_path.request_uri @@ -335,4 +336,3 @@ end end -