mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
should raise InvalidComponentError if MAILTO_REGEXP could not match with @opaque.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8232622071
commit
76e8a9e828
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@ module URI
|
|||
# headers = "?" header *( "&" header )
|
||||
# to = #mailbox
|
||||
# mailtoURL = "mailto:" [ to ] [ headers ]
|
||||
MAILBOX_PATTERN = "(?:[^(),%?=&]|#{PATTERN::ESCAPED})".freeze
|
||||
MAILBOX_PATTERN = "(?:#{PATTERN::ESCAPED}|[^(),%?=&])".freeze
|
||||
MAILTO_REGEXP = Regexp.new("
|
||||
\\A
|
||||
(#{MAILBOX_PATTERN}*?) (?# 1: to)
|
||||
|
@ -128,7 +128,8 @@ module URI
|
|||
set_to($1)
|
||||
set_headers($2)
|
||||
end
|
||||
elsif arg[-1]
|
||||
|
||||
else
|
||||
raise InvalidComponentError,
|
||||
"unrecognised opaque part for mailtoURL: #{@opaque}"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue