From 38c706040d17ed260f73b5244c414bde08b46415 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 2 Jul 2016 09:05:05 +0000 Subject: * 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/mailto.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index 495f939a3b..7299550d3f 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -136,6 +136,9 @@ module URI @to = nil @headers = [] + # The RFC3986 parser does not normally populate opaque + @opaque = "?#{@query}" if @query && !@opaque + unless @opaque raise InvalidComponentError, "missing opaque part for mailto URL" -- cgit v1.2.3