From: Peter Szinek Date: 2007-01-15T20:43:21+09:00 Subject: Re: cannot return negative value ? Josselin wrote: > I got the following error : > > parse error, unexpected tUMINUS_NUM > > userCredential.flagged? ? return -1 : return 1 You mean return userCredential.flagged? -1 : 1 ? I am not sure in Ruby, but if it's the same than in C or anywhere else, the ternary operator evaluates to a value, and you can not really execute things like this inside... Cheers, Peter __ http://www.rubyrailways,com