From 329b4782ff5eaae607dc3a05bc6e0004dd9fddd1 Mon Sep 17 00:00:00 2001 From: akira Date: Sun, 22 Feb 2004 04:06:09 +0000 Subject: * lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/mailto.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/uri/mailto.rb') diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index f01673fd63..3f2439ed34 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -59,6 +59,10 @@ module URI \\? (#{HEADER_PATTERN}(?:\\&#{HEADER_PATTERN})*) (?# 2: headers) )? + (?: + \\# + (#{PATTERN::FRAGMENT}) (?# 3: fragment) + )? \\z ", Regexp::EXTENDED, 'N').freeze @@ -228,6 +232,11 @@ module URI '?' + @headers.collect{|x| x.join('=')}.join('&') else '' + end + + if @fragment + '#' + @fragment + else + '' end end -- cgit v1.2.3