• ruby 2.6 : File.mtime fails when filename ends with dot char

    From Ni Va@21:1/5 to All on Sun Dec 15 04:09:45 2019
    Hi,

    Trying to get mtime of this 'Vim.' and ending fails.
    Even if I replace dot by backslash dot it fails.

    Thank you in advance.

    The ruby code used:

    if f =~/\.$/
    VIM::message('This is matching a point char ' + f.to_s())
    f1 = f.gsub(/\./, '\.')
    VIM::message('So now its this filename that is passed ' + f1.to_s())
    begin
    File.mtime(f1)
    rescue
    VIM::message('Unable to get mtime on File "' + f1.to_s() + '"')
    VIM::message('And current path is "' + Dir.pwd.to_s() + '"')
    ensure
    end
    else

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)