From: Luca Scaljery Date: 2008-02-16T06:51:51+09:00 Subject: Re: syntax problem: @var=="v" ? { ... } : { ... } thnx, that works, but what if I want to do 2 or more actions/statements for each options ? @var == "v" ? P("V");do_something("V") : ...... suggestions ? Stefano Crocco wrote: > Alle Friday 15 February 2008, Sebastian Hungerecker ha scritto: >> Luca Scaljery wrote: >> > @var = "v" >> > @var == "v" ? { p "V" } : { p "M" } >> > >> > this however doesn't work, but I'm sure something like this can be done! >> > Any suggestions ? >> >> Leave out the curlies. > > And put brackets around the arguments of p, otherwise you'll get a > syntax > error > > Stefano -- Posted via http://www.ruby-forum.com/.