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

[ruby/irb] Suppress error when File::ALT_SEPARATOR is nil

https://github.com/ruby/irb/commit/96accf3b95
This commit is contained in:
aycabta 2021-02-10 23:24:39 +09:00 committed by git
parent c3b2bb0969
commit d77a42fbfd

View file

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