Skip to content

Commit

Permalink
[ruby/uri] Include RFC2396_REGEXP module directly
Browse files Browse the repository at this point in the history
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.

ruby/uri@ed6ded9c80
  • Loading branch information
peterzhu2118 authored and matzbot committed Apr 22, 2022
1 parent c94f964 commit eab354e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/uri/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
require_relative "rfc3986_parser"

module URI
include RFC2396_REGEXP

REGEXP = RFC2396_REGEXP
Parser = RFC2396_Parser
RFC3986_PARSER = RFC3986_Parser.new
Expand Down Expand Up @@ -62,8 +64,6 @@ def make_components_hash(klass, array_hash)
module_function :make_components_hash
end

include REGEXP

module Schemes
end
private_constant :Schemes
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/mailto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module URI
# RFC6068, the mailto URL scheme.
#
class MailTo < Generic
include REGEXP
include RFC2396_REGEXP

# A Default port of nil for URI::MailTo.
DEFAULT_PORT = nil
Expand Down

0 comments on commit eab354e

Please sign in to comment.