Permalink
Browse files

Preliminarily drop gems from path

As discussed in gh-32:

1.  It's slow.
2.  It puts multiple versions of gems in the path, sometimes with older
    gems coming before newer gems.
3.  Does anyone actually want this?

As to #3, let's try dropping it and see if anyone even notices.
  • Loading branch information...
1 parent 699670a commit 07d0b51e96ff3c8878848bc29f3a401c4fabf75b @tpope tpope committed Apr 10, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 ftplugin/ruby.vim
View
@@ -72,10 +72,10 @@ if !exists("s:ruby_path")
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"' % $:.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{,})"
+ let s:code = "print $:.join(%q{,})"
if &shellxquote == "'"
let s:ruby_path = system('ruby -e "' . s:code . '"')
else

0 comments on commit 07d0b51

Please sign in to comment.