EdUarDo <eduardo.yanezNOSPAM / nospamgmail.com> 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