diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-27 03:13:22 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-27 03:13:22 +0000 |
commit | a4645e56126cc8807fa66d1078d63447510623cf (patch) | |
tree | 58d4071bc5c0417487c89ae458349ac1f98630ad /test/uri/test_parser.rb | |
parent | dd798a68a20012ca86fcd8825c7ec8e3605d01e9 (diff) | |
download | ruby-a4645e56126cc8807fa66d1078d63447510623cf.tar.gz |
* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150]
* test/uri/test_parser.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri/test_parser.rb')
-rw-r--r-- | test/uri/test_parser.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb index adf8a1292c..188b4f858c 100644 --- a/test/uri/test_parser.rb +++ b/test/uri/test_parser.rb @@ -38,4 +38,10 @@ class URI::TestParser < Test::Unit::TestCase assert_equal(['http', nil, 'a', URI::HTTP.default_port, '/%uDCBA', nil, nil], uri_to_ary(u1)) end + + def test_raise_bad_uri_for_integer + assert_raise(URI::InvalidURIError) do + URI.parse(1) + end + end end |