brew install
with the option --env=std
so the Ruby in the current PATH will be used while compiling (mac)vim.
brew install --env=std vim --with-custom-ruby --with-override-system-vi --with-lua --with-luajit --with-mzscheme --with-tcl
brew install --env=std macvim --with-lua --with-luajit --with-python3 --HEAD