Skip to content

Commit 07d0b51

Browse files
committed
Preliminarily drop gems from path
As discussed in vim-rubygh-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 vim-ruby#3, let's try dropping it and see if anyone even notices.
1 parent 699670a commit 07d0b51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ftplugin/ruby.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ if !exists("s:ruby_path")
7272
if exists("g:ruby_path")
7373
let s:ruby_path = g:ruby_path
7474
elseif has("ruby") && has("win32")
75-
ruby VIM::command( 'let s:ruby_path = "%s"' % ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,}) )
75+
ruby VIM::command( 'let s:ruby_path = "%s"' % $:.join(%q{,}) )
7676
let s:ruby_path = '.,' . substitute(s:ruby_path, '\%(^\|,\)\.\%(,\|$\)', ',,', '')
7777
elseif executable("ruby")
78-
let s:code = "print ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"
78+
let s:code = "print $:.join(%q{,})"
7979
if &shellxquote == "'"
8080
let s:ruby_path = system('ruby -e "' . s:code . '"')
8181
else

0 commit comments

Comments
 (0)