summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-12 06:42:42 +0000
committerakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-12 06:42:42 +0000
commit817961e5d25921136d02976646ceca2966abe686 (patch)
tree19ed5b6c6e9b293a4bf6c2e8efea3b1bcd1f78f8 /lib
parentdd20cbb631c68fb7583d0e82aac9fefe83c4e461 (diff)
fixed a bug of URI::extract. URI::extract should return ["mailto:xxx"] instead of ["mailtto:"] for "foo bar <mailto:xxx>".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/uri/common.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 8ca3c08482..5d6a3b5519 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -145,19 +145,19 @@ module URI
X_ABS_URI = "
(#{PATTERN::SCHEME}): (?# 1: scheme)
(?:
+ (#{PATTERN::OPAQUE_PART}) (?# 2: opaque)
+ |
(?:(?:
//(?:
- (?:(?:(#{PATTERN::USERINFO})@)? (?# 2: userinfo)
- (?:(#{PATTERN::HOST})(?::(\\d*))?))?(?# 3: host, 4: port)
+ (?:(?:(#{PATTERN::USERINFO})@)? (?# 3: userinfo)
+ (?:(#{PATTERN::HOST})(?::(\\d*))?))?(?# 4: host, 5: port)
|
- (#{PATTERN::REG_NAME}) (?# 5: registry)
+ (#{PATTERN::REG_NAME}) (?# 6: registry)
)
|
(?!//)) (?# XXX: '//' is the mark for hostport)
- (#{PATTERN::ABS_PATH})? (?# 6: path)
- )(?:\\?(#{PATTERN::QUERY}))? (?# 7: query)
- |
- (#{PATTERN::OPAQUE_PART}) (?# 8: opaque)
+ (#{PATTERN::ABS_PATH})? (?# 7: path)
+ )(?:\\?(#{PATTERN::QUERY}))? (?# 8: query)
)
(?:\\#(#{PATTERN::FRAGMENT}))? (?# 9: fragment)
"
@@ -292,8 +292,8 @@ module URI
# null uri
when ABS_URI
- scheme, userinfo, host, port,
- registry, path, query, opaque, fragment = $~[1..-1]
+ scheme, opaque, userinfo, host, port,
+ registry, path, query, fragment = $~[1..-1]
# URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]