diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-25 07:03:05 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-25 07:03:05 +0000 |
commit | 73cd3df3cbd260aeff851ec2c07553f1d351109d (patch) | |
tree | be5c55e74362ec058e7350d490fa375f3abd2f04 /lib | |
parent | 6e99aec79876740e341ca3969379bba2aab375fe (diff) | |
download | ruby-73cd3df3cbd260aeff851ec2c07553f1d351109d.tar.gz ruby-73cd3df3cbd260aeff851ec2c07553f1d351109d.tar.xz ruby-73cd3df3cbd260aeff851ec2c07553f1d351109d.zip |
* io.c (appendline): forget to terminate with nul.
* eval.c (ruby_run): should set toplevel visibility again here.
* eval.c (rb_eval): should not rely on ruby_class == rb_cObject
check. Besides allow implicit publicity for attribute set
methods.
* parse.y (primary): need not to check class_nest, just set
whether method is an attrset or not.
* string.c (rb_str_each_line): p might be at the top of the
string.
* class.c (rb_make_metaclass): class of metaclass should be
metaclass of superclass, unless class itself is a metaclass;
class of metaclass of metaclass should point back to self.
eh, confusing, isn't it.
* class.c (rb_singleton_class): check if its class is singleton
AND attached to self.
* eval.c (rb_eval): should define class/module under ruby_cbase.
* eval.c (rb_eval): should set class/module path based on
ruby_cbase, not ruby_class.
* eval.c (module_setup): use ruby_cbase instead of ruby_class.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uri/mailto.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index bf6b95490..b1c18f436 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -46,20 +46,22 @@ module URI # hname = *urlc # hvalue = *urlc # header = hname "=" hvalue - HEADER_REGEXP = "(?:[^?=&]*=[^?=&]*)".freeze + header_pattern = "(?:[^?=&]*=[^?=&]*)" + HEADER_REGEXP = /#{header_pattern}/ # headers = "?" header *( "&" header ) # to = #mailbox # mailtoURL = "mailto:" [ to ] [ headers ] - MAILBOX_REGEXP = "(?:[^(),%?=&]|#{PATTERN::ESCAPED})".freeze + mailbox_pattern = "(?:[^(),%?=&]|#{PATTERN::ESCAPED})" + MAILBOX_REGEXP = /#{mailbox_pattern}/ MAILTO_REGEXP = Regexp.new(" \\A - (#{MAILBOX_REGEXP}*?) (?# 1: to) + (#{mailbox_pattern}*?) (?# 1: to) (?: \\? - (#{HEADER_REGEXP}(?:\\&#{HEADER_REGEXP})*) (?# 2: headers) + (#{header_pattern}(?:\\&#{header_pattern})*) (?# 2: headers) )? \\z - ", Regexp::EXTENDED, 'N').freeze + ", Regexp::EXTENDED, 'N') =begin |