From: Jason Mayer Date: 2006-12-28T05:17:29+09:00 Subject: Re: Handling of arbitrary length arrays in arguments to printf builtin ------=_Part_92532_17394002.1167250647665 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/27/06, Timothy Hunter wrote: > > Welcome to Ruby! > > Use the "*" (splat) operator to turn the array into a list of arguments. > > printf "%s %s", *@params > > The unary asterisk is often called the "unary unarray" operator because > it has this effect on an array. Neat! How would you use that to return "bar stuff" with the following? @params = ["foo", "bar", "stuff"] print @params.inspect printf "%s %s", *@params I'm not sure that Ri Array#* is quite what I meant to look for. ------=_Part_92532_17394002.1167250647665--