don't set RUBYOPT on windows

This commit is contained in:
kongo2002 2010-12-26 10:12:59 +08:00 committed by Martin Grenfell
parent 85f11ca138
commit 1a1593a6fd

View File

@ -20,7 +20,12 @@ if !executable("ruby")
endif
function! SyntaxCheckers_ruby_GetLocList()
let makeprg = 'RUBYOPT= ruby -W1 -c '.shellescape(expand('%'))
" we cannot set RUBYOPT on windows like that
if has('win32') || has('win64')
let makeprg = 'ruby -W1 -T1 -c '.shellescape(expand('%'))
else
let makeprg = 'RUBYOPT= ruby -W1 -c '.shellescape(expand('%'))
endif
let errorformat = '%-GSyntax OK,%E%f:%l: syntax error\, %m,%Z%p^,%W%f:%l: warning: %m,%Z%p^,%-C%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })