diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-23 08:12:52 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-23 08:12:52 +0000 |
commit | 44d72332014b5feac64efd25cde6d122067b7019 (patch) | |
tree | c5303fce4d4f8fc033168dd8e0234f9da05d0c1e /test/uri/test_mailto.rb | |
parent | aa5b65b2edf4e79f09b6e9dd488bf160b6a39260 (diff) | |
download | ruby-44d72332014b5feac64efd25cde6d122067b7019.tar.gz |
* lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change of
Ruby 1.9; use Array#join. [Bug #5840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34360 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, 10 insertions, 0 deletions
diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb index 04fb6fdadc..c2158845e8 100644 --- a/test/uri/test_mailto.rb +++ b/test/uri/test_mailto.rb @@ -82,6 +82,16 @@ class TestMailTo < Test::Unit::TestCase ok[-1] << {:to => "unlikely%3Faddress@example.com", :headers => ["blat=foop"]} + # mailto:john@example.com?Subject=Ruby&Cc=jack@example.com + ok << ["mailto:john@example.com?Subject=Ruby&Cc=jack@example.com"] + ok[-1] << ['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]] + ok[-1] << {:to=>"john@example.com", :headers=>[["Subject", "Ruby"], ["Cc", "jack@example.com"]]} + + # mailto:listman@example.com?subject=subscribe + ok << ["mailto:listman@example.com?subject=subscribe"] + ok[-1] << {:to => 'listman@example.com', :headers => [['subject', 'subscribe']]} + ok[-1] << {:to => 'listman@example.com', :headers => [['subject', 'subscribe']]} + ok_all = ok.flatten.join("\0") # mailto:joe@example.com?cc=bob@example.com?body=hello ; WRONG! |