Ruby interprets paths in POSIX , that is, if possible, you should use slashes.
, Windows. , .
\\\\server\\share
, UNC- . Ruby/Windows, , script, Ruby Windows, , :
def windows_path(value)
value.gsub '/', '\\'
end
def posix_path(value)
value.gsub '\\', '/'
end
, , . Ruby, . irb.
irb> File.exists?
SyntaxError: (irb):2: unknown regexp options - rvr