Module: Addressable::URI::CharacterClasses

Defined in:
lib/addressable/uri.rb

Overview

Container for the character classes specified in <a href=“www.ietf.org/rfc/rfc3986.txt”>RFC 3986</a>.

Note: Concatenated and interpolated ‘String`s are not affected by the

`frozen_string_literal` directive and must be frozen explicitly.

Interpolated `String`s *were* frozen this way before Ruby 3.0:
https://bugs.ruby-lang.org/issues/17104

Constant Summary collapse

ALPHA =
"a-zA-Z"
DIGIT =
"0-9"
GEN_DELIMS =
"\\:\\/\\?\\#\\[\\]\\@"
SUB_DELIMS =
"\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\="
RESERVED =
(GEN_DELIMS + SUB_DELIMS).freeze
UNRESERVED =
(ALPHA + DIGIT + "\\-\\.\\_\\~").freeze
RESERVED_AND_UNRESERVED =
RESERVED + UNRESERVED
PCHAR =
(UNRESERVED + SUB_DELIMS + "\\:\\@").freeze
SCHEME =
(ALPHA + DIGIT + "\\-\\+\\.").freeze
HOST =
(UNRESERVED + SUB_DELIMS + "\\[\\:\\]").freeze
AUTHORITY =
(PCHAR + "\\[\\]").freeze
PATH =
(PCHAR + "\\/").freeze
QUERY =
(PCHAR + "\\/\\?").freeze
FRAGMENT =
(PCHAR + "\\/\\?").freeze