In article <834rktqq0w.fsf / kluane.info.emn.fr>, Pierre-Charles David wrote:
> fastjack / camelot.germanistik.fu-berlin.de (Martin Maciaszek) writes:
> 
>> To edit my ruby code I rediscovered the good old vim. vim6 even has
>> syntax highlighting rules for ruby. Which works great, except on the
>> following code:
>> dbh.do("select whatever from whereever;")
>>   foo
>> end
> 
> It's not a Vim bug, Ruby itself gives a "parse error" on this code.
> You forgot the second 'do' (not the method one, the one starting the
> block).
> 
> dbh.do("select whatever from whereever;") do
>   foo
> end
> 
> or
> 
> dbh.do("select whatever from whereever;") {
>   foo
> }
> 
I'm sorry I copied this code wrong. My example was more like
this:
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.

Cheers
Martin