aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/ruby.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-09-05 15:02:46 -0700
committerGitHub <noreply@github.com>2020-09-05 15:02:46 -0700
commitbedab7e87b038da11f93484c1bc1e036fea520b9 (patch)
treebec94773b8733b5e6a43ab449a632c62a7cccbab /runtime/autoload/provider/ruby.vim
parentfb55cb2d91382d2646205c9a7709f9517eb7f153 (diff)
downloadrneovim-bedab7e87b038da11f93484c1bc1e036fea520b9.tar.gz
rneovim-bedab7e87b038da11f93484c1bc1e036fea520b9.tar.bz2
rneovim-bedab7e87b038da11f93484c1bc1e036fea520b9.zip
provider: align all foo#Detect() functions #12839
Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair which means callers must special-case them. Solution: align their return signatures with the perl/pythonx providers.
Diffstat (limited to 'runtime/autoload/provider/ruby.vim')
-rw-r--r--runtime/autoload/provider/ruby.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/autoload/provider/ruby.vim b/runtime/autoload/provider/ruby.vim
index f843050df9..1f49c623ac 100644
--- a/runtime/autoload/provider/ruby.vim
+++ b/runtime/autoload/provider/ruby.vim
@@ -5,7 +5,8 @@ endif
let g:loaded_ruby_provider = 1
function! provider#ruby#Detect() abort
- return s:prog
+ let e = empty(s:prog) ? 'missing ruby or ruby-host' : ''
+ return [s:prog, e]
endfunction
function! provider#ruby#Prog() abort