On Wed, Sep 8, 2010 at 11:36 AM, Ammar Ali <ammarabuali / gmail.com> wrote:
> On Wed, Sep 8, 2010 at 10:09 AM, Robert Klemme
> <shortcutter / googlemail.com> wrote:
>> You could do
>>
>> def simple(*a)
>>  ® >>  ®>>  
>> end
>
> It's also possible to use * when passing the array to the method,
> without changing the method:
>
>> some_items = [1, "more", %w{four six eight}]
>> some_method *some_items

Of course, but that's not what Terry asked for.  He wanted to make it
convenient for the caller so he could do

m(1,2,3,4)
m([1,2,3,4])
m(some_array)

Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/