Skip to content

Commit ed6ded9

Browse files
committed
Include RFC2396_REGEXP module directly
REGEXP is defined as RFC2396_REGEXP in lib/uri/common.rb. If we include REGEXP then a broken URL is generated in rdoc for URI and URI::MailTo.
1 parent 5864179 commit ed6ded9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/uri/common.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
require_relative "rfc3986_parser"
1414

1515
module URI
16+
include RFC2396_REGEXP
17+
1618
REGEXP = RFC2396_REGEXP
1719
Parser = RFC2396_Parser
1820
RFC3986_PARSER = RFC3986_Parser.new
@@ -62,8 +64,6 @@ def make_components_hash(klass, array_hash)
6264
module_function :make_components_hash
6365
end
6466

65-
include REGEXP
66-
6767
module Schemes
6868
end
6969
private_constant :Schemes

lib/uri/mailto.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module URI
1515
# RFC6068, the mailto URL scheme.
1616
#
1717
class MailTo < Generic
18-
include REGEXP
18+
include RFC2396_REGEXP
1919

2020
# A Default port of nil for URI::MailTo.
2121
DEFAULT_PORT = nil

0 commit comments

Comments
 (0)