1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Fix inverse separator condition

https://github.com/ruby/irb/commit/33f933196f
This commit is contained in:
Nobuyoshi Nakada 2021-02-11 21:03:11 +09:00 committed by git
parent aea40f44aa
commit b83b27cddb

View file

@ -38,11 +38,9 @@ module IRB # :nodoc:
else
separator =
if File::ALT_SEPARATOR
File::SEPARATOR
"[#{Regexp.quote(File::SEPARATOR + File::ALT_SEPARATOR)}]"
else
separators = File::SEPARATOR
separators += File::ALT_SEPARATOR if File::ALT_SEPARATOR
"[#{Regexp.quote(separators)}]"
File::SEPARATOR
end
ABSOLUTE_PATH_PATTERN = # :nodoc:
case Dir.pwd