Explicitly prefer top level VIM module

Hopefully resolves #6.
This commit is contained in:
Tim Pope 2012-12-06 18:08:44 -05:00
parent 8865fcbb23
commit 8ce5fbd119
1 changed files with 7 additions and 5 deletions

View File

@ -178,11 +178,13 @@ endif
ruby << ruby <<
require 'timeout' require 'timeout'
require 'socket' require 'socket'
def VIM.string_encode(str) class << ::VIM
'"' + str.gsub(/[\000-\037"\\]/) { |x| "\\%03o" % (x.respond_to?(:ord) ? x.ord : x[0]) } + '"' def string_encode(str)
end '"' + str.gsub(/[\000-\037"\\]/) { |x| "\\%03o" % (x.respond_to?(:ord) ? x.ord : x[0]) } + '"'
def VIM.let(var, value) end
VIM.command("let #{var} = #{string_encode(value)}") def let(var, value)
VIM.command("let #{var} = #{string_encode(value)}")
end
end end
. .