mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/xmlrpc/client.rb (new2): raises an ArgumentError on bad
arguments. * test/xmlrpc/test_client.rb: tests for bad uris git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
60282ebfe5
commit
cd85cd25b4
3 changed files with 42 additions and 2 deletions
|
@ -349,12 +349,12 @@ module XMLRPC
|
|||
when 'http' then port ||= 80
|
||||
when 'https' then port ||= 443
|
||||
else
|
||||
raise "Wrong protocol specified. Only http or https allowed!"
|
||||
raise ArgumentError, "Wrong protocol specified. Only http or https allowed!"
|
||||
end
|
||||
|
||||
port = port.to_i
|
||||
else
|
||||
raise "Wrong URI as parameter!"
|
||||
raise ArgumentError, "Wrong URI as parameter!"
|
||||
end
|
||||
|
||||
proxy_host, proxy_port = (proxy || "").split(":")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue