Skip to content

Commit 252a14c

Browse files
committed
Revert "pathname: SEPARATOR_PAT is no longer used"
This reverts commit 163f2f7. Due to a previous typo, this constant was not marked as `private`, so Bundler was using it.
1 parent c39ff92 commit 252a14c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pathname_builtin.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,18 @@ def inspect # :nodoc:
291291
"#<#{self.class}:#{@path}>"
292292
end
293293

294+
if File::ALT_SEPARATOR
295+
# Separator list string.
296+
separator_list = Regexp.quote "#{File::ALT_SEPARATOR}#{File::SEPARATOR}"
297+
# Regexp that matches a separator.
298+
SEPARATOR_PAT = /[#{separator_list}]/
299+
else
300+
separator_list = Regexp.quote File::SEPARATOR
301+
SEPARATOR_PAT = /#{separator_list}/
302+
end
303+
SEPARATOR_PAT.freeze
304+
deprecate_constant :SEPARATOR_PAT
305+
294306
# Creates a full path, including any intermediate directories that don't yet
295307
# exist.
296308
#

0 commit comments

Comments
 (0)