mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[DOC] Document constants in Pathname
This commit is contained in:
parent
1928df4d33
commit
da6198de8f
@ -311,7 +311,9 @@ class Pathname
|
||||
end
|
||||
|
||||
if File::ALT_SEPARATOR
|
||||
# Separator list string.
|
||||
SEPARATOR_LIST = "#{Regexp.quote File::ALT_SEPARATOR}#{Regexp.quote File::SEPARATOR}"
|
||||
# Regexp that matches a separator.
|
||||
SEPARATOR_PAT = /[#{SEPARATOR_LIST}]/
|
||||
else
|
||||
SEPARATOR_LIST = "#{Regexp.quote File::SEPARATOR}"
|
||||
@ -319,6 +321,7 @@ class Pathname
|
||||
end
|
||||
|
||||
if File.dirname('A:') == 'A:.' # DOSish drive letter
|
||||
# Regexp that matches an absoltute path.
|
||||
ABSOLUTE_PATH = /\A(?:[A-Za-z]:|#{SEPARATOR_PAT})/
|
||||
else
|
||||
ABSOLUTE_PATH = /\A#{SEPARATOR_PAT}/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user