runtime: Fix problem of checking wrong cwd for ruby ftplugin (#13026)

Co-authored-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Anton Sharonov (ant0sha)
2023-09-04 22:21:00 +02:00
committed by GitHub
parent 544be0d893
commit 282a94be99

View File

@ -77,7 +77,7 @@ function! s:query_path(root) abort
let cwd = fnameescape(getcwd())
try
exe cd fnameescape(a:root)
if fnamemodify(exepath('ruby'), ':p:h') ==# getcwd()
if fnamemodify(exepath('ruby'), ':p:h') ==# cwd
let path = []
else
let path = split(system(path_check),',')