diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/uri/mailto.rb | 9 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Sun Feb 22 13:05:37 2004 akira yamada <akira@ruby-lang.org> + + * lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment. + Sun Feb 22 12:58:35 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/extmk.rb: use optparse instead of getopts. 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 |