From: Martin DeMello Date: 2005-07-26T15:15:59+09:00 Subject: Re: Newby question 'unless' EdUarDo wrote: > > I think I figured out what you want :-) You always want @a, and you > > only want @b if @a is not zero: > > Yes :) > > > > > "#{@a}#{@b unless @a.zero?}" > > That's what I wanted. I didn't know that the condition could be into > the brackets. Thanks. #{} can contain an arbitrarily complex expression, the result of which has to_s called on it before being interpolated. martin