On 2007-01-15 12:43:21 +0100, Peter Szinek <peter / rubyrailways.com> said:

> 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

thanks a lot first time I was using this kind of return... ;-))