Merge pull request #745 from MasterLambaster/ruby-detection

Make ruby c header detection work with all ruby versions
This commit is contained in:
LCD 47 2013-07-29 22:09:48 -07:00
commit f165e8b4a2

View File

@ -199,7 +199,7 @@ function! syntastic#c#CheckRuby()
if executable('ruby') if executable('ruby')
if !exists('s:ruby_flags') if !exists('s:ruby_flags')
let s:ruby_flags = system('ruby -r rbconfig -e ' let s:ruby_flags = system('ruby -r rbconfig -e '
\ . '''puts Config::CONFIG["archdir"]''') \ . '''puts RbConfig::CONFIG["rubyhdrdir"] || RbConfig::CONFIG["archdir"]''')
let s:ruby_flags = substitute(s:ruby_flags, "\n", '', '') let s:ruby_flags = substitute(s:ruby_flags, "\n", '', '')
let s:ruby_flags = ' -I' . s:ruby_flags let s:ruby_flags = ' -I' . s:ruby_flags
endif endif