summaryrefslogtreecommitdiffstats
path: root/lib/uri
diff options
context:
space:
mode:
authorakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-22 04:06:09 +0000
committerakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-22 04:06:09 +0000
commitad320ec945454336d4d64f3cd9344b6dfc46fdf5 (patch)
treeb097753b92d1d59245ce4aea9ec855213d002807 /lib/uri
parent4ba37fb0b82aac7ccb397a52ff11587340470d9d (diff)
downloadruby-ad320ec945454336d4d64f3cd9344b6dfc46fdf5.tar.gz
ruby-ad320ec945454336d4d64f3cd9344b6dfc46fdf5.tar.xz
ruby-ad320ec945454336d4d64f3cd9344b6dfc46fdf5.zip
* lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri')
-rw-r--r--lib/uri/mailto.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb
index f01673fd6..3f2439ed3 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