summaryrefslogtreecommitdiff
path: root/lib/uri/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r--lib/uri/common.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 6f2fa81ad2..ea7d3c8865 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -145,14 +145,14 @@ module URI
X_ABS_URI = "
(#{PATTERN::SCHEME}): (?# 1: scheme)
(?:
- (?:
+ (?:(?:
//(?:
(?:(?:(#{PATTERN::USERINFO})@)? (?# 2: userinfo)
(?:(#{PATTERN::HOST})(?::(\\d*))?))?(?# 3: host, 4: port)
|
(#{PATTERN::REG_NAME}) (?# 5: registry)
- )
- (#{PATTERN::ABS_PATH})? (?# 6: path)
+ ))?
+ ((?!//)#{PATTERN::ABS_PATH})? (?# 6: path)
)(?:\\?(#{PATTERN::QUERY}))? (?# 7: query)
|
(#{PATTERN::OPAQUE_PART}) (?# 8: opaque)
@@ -231,7 +231,7 @@ module URI
end
else
raise ArgumentError,
- "expected Array of or Hash of compornents of #{klass.to_s} (#{klass.component[1..-1].join(', ')})"
+ "expected Array of or Hash of components of #{klass.to_s} (#{klass.component[1..-1].join(', ')})"
end
tmp[:scheme] = klass.to_s.sub(/\A.*::/, '').downcase