diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-02 09:05:05 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-02 09:05:05 +0000 |
commit | 38c706040d17ed260f73b5244c414bde08b46415 (patch) | |
tree | e26741e3eb04e1be981dda6231009b75a8b9f472 /test/uri/test_mailto.rb | |
parent | 3daf4241c882c7a12a4522fefbf1791f0fb5067f (diff) | |
download | ruby-38c706040d17ed260f73b5244c414bde08b46415.tar.gz |
* lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque
only if the URI has path-rootless, not path-empty.
[ruby-core:76055] [Bug #12498]
patched by Chris Heisterkamp <cheister@squareup.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri/test_mailto.rb')
-rw-r--r-- | test/uri/test_mailto.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb index 4e3b0425fa..c09b001e0f 100644 --- a/test/uri/test_mailto.rb +++ b/test/uri/test_mailto.rb @@ -112,13 +112,15 @@ class TestMailTo < Test::Unit::TestCase bad << ["foo@example.jp?subject=1+1=2", []] ok.each do |x| - assert_equal(x[0], - @u.build(x[1]).to_s) - assert_equal(x[0], - @u.build(x[2]).to_s) + assert_equal(x[0], URI.parse(x[0]).to_s) + assert_equal(x[0], @u.build(x[1]).to_s) + assert_equal(x[0], @u.build(x[2]).to_s) end bad.each do |x| + assert_raise(URI::InvalidURIError) { + URI.parse(x) + } assert_raise(URI::InvalidComponentError) { @u.build(x) } |