Skip to content


Avoid regexp error for foo(*args).baz pattern #98

wants to merge 1 commit into from

3 participants


to reproduce:

foo(*args). # invoke omni completion here

@segfault segfault was assigned
Vim-Ruby member

I'm afraid I'm not very familiar with the completion script, but from what I was able to understand, it seems like issue #120 manages to fix it in a slightly safer way. With this PR, I'm not entirely sure if GetRubyVarType could be called with something that's not quite \w+, like @foo or something, which is why I decided to merge in @sencer's solution.

In any case, thank you for your work, and sorry for the long wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 4, 2012
  1. @todesking
Showing with 3 additions and 1 deletion.
  1. +3 −1 autoload/rubycomplete.vim
4 autoload/rubycomplete.vim
@@ -355,8 +355,10 @@ class VimRubyCompletion
def get_var_type( receiver )
if /(\"|\')+/.match( receiver )
- else
+ elsif /^\w+$/.match( receiver ) # to avoid "*args" pattern
VIM::evaluate("s:GetRubyVarType('%s')" % receiver)
+ else
+ ''
Something went wrong with that request. Please try again.