eRuby: take into account &fileencoding.

This commit is contained in:
LCD 47 2013-06-12 08:00:27 +03:00
parent 73a83a3208
commit ede4127f13

View File

@ -25,15 +25,15 @@ endfunction
function! SyntaxCheckers_eruby_ruby_GetLocList()
let exe = expand(g:syntastic_ruby_exec)
let encoding_string = ''
if &encoding == 'utf-8'
let encoding_string = ', :encoding => "UTF-8"'
if !has('win32')
let exe = 'RUBYOPT= ' . exe
endif
let fname = fnameescape(expand('%'))
let enc = &fileencoding != '' ? &fileencoding : &encoding
let encoding_string = enc ==# 'utf-8' ? ', :encoding => "UTF-8"' : ''
"gsub fixes issue #7, rails has it's own eruby syntax
let makeprg =
\ exe . ' -rerb -e ' .