From: Javier Fontan Date: 2002-02-08T00:29:28+09:00 Subject: Re: ruby and vim hello this bit of code does work well but is not well hilighted --8<---- if(!@usrData) @db.do("INSERT INTO usuarios (login) VALUES ('#{user}')") @usrData=@db.select_one("SELECT * FROM usuarios WHERE login='#{user}'") end ---->8-- the do method here does not get a block bye On Thu 07 Feb 2002 16:15, 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 > } -- Javier Fontan Mui�os jfontan@cesga.es CESGA, Supercomputing Center of Galicia