We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c39ff92 commit 252a14cCopy full SHA for 252a14c
1 file changed
pathname_builtin.rb
@@ -291,6 +291,18 @@ def inspect # :nodoc:
291
"#<#{self.class}:#{@path}>"
292
end
293
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
+
306
# Creates a full path, including any intermediate directories that don't yet
307
# exist.
308
#
0 commit comments