summaryrefslogtreecommitdiff
path: root/lib/xmlrpc/client.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-02 23:21:17 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-02 23:21:17 +0000
commitcd85cd25b4f129225d20d36fa5326e9e57901da0 (patch)
tree356d5a34318c303f173303ab1bb5382a15887e14 /lib/xmlrpc/client.rb
parent60282ebfe5ddb283fc2312fb6a2ce9e928cb2ad9 (diff)
* 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
Diffstat (limited to 'lib/xmlrpc/client.rb')
-rw-r--r--lib/xmlrpc/client.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb
index b9d4affeb2..d6495b55c4 100644
--- a/lib/xmlrpc/client.rb
+++ b/lib/xmlrpc/client.rb
@@ -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(":")