Do not use Ruby older than 1.8.7

Close #482
This commit is contained in:
Junegunn Choi 2016-05-13 02:06:00 +09:00
parent 656ccef8dc
commit bf1e0fb8eb
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -846,13 +846,14 @@ function! s:names(...)
endfunction endfunction
function! s:check_ruby() function! s:check_ruby()
silent! ruby require 'thread'; VIM::command('let g:plug_ruby = 1') silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'")
if get(g:, 'plug_ruby', 0) if !exists('g:plug_ruby')
unlet g:plug_ruby redraw!
return 1 return s:warn('echom', 'Warning: Ruby interface is broken')
endif endif
redraw! let ruby_version = split(g:plug_ruby, '\.')
return s:warn('echom', 'Warning: Ruby interface is broken') unlet g:plug_ruby
return s:version_requirement(ruby_version, [1, 8, 7])
endfunction endfunction
function! s:update_impl(pull, force, args) abort function! s:update_impl(pull, force, args) abort