1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is

a relative URI. [Bug #8645]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-07-24 10:52:15 +00:00
parent d9a556548e
commit 6398f79853
3 changed files with 7 additions and 0 deletions

View file

@ -736,6 +736,7 @@ class URI::TestGeneric < Test::Unit::TestCase
# 192.0.2.0/24 is TEST-NET. [RFC3330]
def test_find_proxy
assert_raise(URI::BadURIError){ URI("foo").find_proxy }
with_env({}) {
assert_nil(URI("http://192.0.2.1/").find_proxy)
assert_nil(URI("ftp://192.0.2.1/").find_proxy)