On Thu, 01 Dec 2005 05:45:53 -0000, <(E-Mail Removed)> wrote:
> On Nov 30, 2005, at 11:32 PM, Trans wrote:
>> Hi Ross, actually as Florian recently taught me, *obj works for any
>> object with #to_ary defined --if that is what you mean.
> Actually, I think the * operator looks for #to_a not #to_ary.
> Gary Wright
Some quick experiments just now suggest it looks first for to_ary, then
to_a. As I say, I was pretty pleased to find it did it at all so I didn't
carry on playing with it ...
Mmm, I remember Matz wonders about possible changes in the way the array
expansion operator * could work. He wonders if he should differentiate
array [a,b,c] and list a,b,c or not. Until decided, I keep in mind that
the way *args works may change in ruby2.