From e3c4c7e13bcf5b202701ef5acc86b06187b5fdb7 Mon Sep 17 00:00:00 2001 From: duerst Date: Wed, 14 Jan 2015 09:06:13 +0000 Subject: * lib/uri/mailto.rb: raising URI::InvalidComponentError instead of failing with undefined method `split' for nil:NilClass for mailto: URIs without opaque part. [Bug #10738] * test/uri/testuri.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/uri/test_mailto.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/uri') diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb index 661f7f7a9c..9001835d28 100644 --- a/test/uri/test_mailto.rb +++ b/test/uri/test_mailto.rb @@ -104,6 +104,9 @@ class TestMailTo < Test::Unit::TestCase # mailto:javascript:alert() bad << ["javascript:alert()", []] + # mailto:/example.com/ ; WRONG, not a mail address + bad << ["/example.com/", []] + # '=' which is in hname or hvalue is wrong. bad << ["foo@example.jp?subject=1+1=2", []] -- cgit v1.2.3