I think this example is asking for the ternary op.

     colors = %w( black red white yellow green )
     colors[0,3].join(', ') + (colors.length > 3 ? ' ...' : '')