Ah, sorry.

"Gem.all_load_paths.sort.uniq" have better to be fallback. it show warning 
message.
Check following.

diff -r 1d1065c2e7fa runtime/ftplugin/ruby.vim
--- a/runtime/ftplugin/ruby.vim Wed Jul 20 18:29:39 2011 +0200
+++ b/runtime/ftplugin/ruby.vim Thu Jul 21 20:43:42 2011 +0900
@@ -73,11 +73,11 @@
   if exists("g:ruby_path")
     let s:ruby_path = g:ruby_path
   elseif has("ruby") && has("win32")
-    ruby VIM::command( 'let s:ruby_path = "%s"' % ($: + begin; require 
%q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; 
end).join(%q{,}) )
+    ruby VIM::command( 'let s:ruby_path = "%s"' % ($: + begin; require 
%q{rubygems}; Gem::Specification.map{|s|s.gem_dir}.sort.uniq; rescue 
NoMethodError; Gem.all_load_paths.sort.uniq; rescue LoadError; []; 
end).join(%q{,}) )
     let s:ruby_path = '.,' . substitute(s:ruby_path, 
'\%(^\|,\)\.\%(,\|$\)', ',,', '')
   elseif executable("ruby")
-    let s:code = "print ($: + begin; require %q{rubygems}; 
Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"
-    if &shellxquote == "'"
+    let s:code = "print ($: + begin; require %q{rubygems}; 
Gem::Specification.map{|s|s.gem_dir}.sort.uniq; rescue NoMethodError; 
Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"
+    if &shellxquote != '"'
       let s:ruby_path = system('ruby -e "' . s:code . '"')
     else
       let s:ruby_path = system("ruby -e '" . s:code . "'")

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui