Subject: Re: Showing part of an array....
From: "Dumaiu" <Dymaio gmail.com>
Date: Sun, 23 Jul 2006 04:25:08 +0900
References: 203295
I think this example is asking for the ternary op.
colors = %w( black red white yellow green )
colors[0,3].join(', ') + (colors.length > 3 ? ' ...' : '')