On 8 Feb 2002, at 3:03, Martin Maciaszek wrote about problems 
with vim syntax highlighting with "unusual" code like:

> def foo
>   dbh.do("select whatever from whereever;")
> end
> 
> vim assumes here the end belongs to the do and colorizes it
> appropriately. This drove me nuts because I thought I forgot
> something there.

I was surprised that Ruby allows method names "do", "class", 
"def", and so on, and I wouldn't recommend using them.

Anyhow, here's a patch to syntax/ruby.vim that seems to fix the 
coloring problem. I've never edited syntax files before, so be 
warned. I'd like to send this patch to the file maintainer for approval, 
but unfortunately he didn't publish his email address and his url is 
invalid...

--- ruby.org.vim	Wed Sep 26 17:09:36 2001
+++ ruby.vim	Thu Feb  7 22:46:42 2002
@@ -182,6 +182,9 @@
 syn match   rubySharpBang  "#!.*"
 syn region  rubyDocumentation  start="^=begin" end="^=end.*$" contains=rubyTodo
 
+" method call
+syn region rubyCall start="\." end="\i\+" contains=rubyComment
+
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
 " For version 5.8 and later: only when an item doesn't have highlighting yet

Regards,
Pit