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>
diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim
index 1262099..daffe1e 100644
--- a/runtime/ftplugin/ruby.vim
+++ b/runtime/ftplugin/ruby.vim
@@ -77,7 +77,7 @@
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),',')