From: "David A. Black" Date: 2005-12-02T00:32:39+09:00 Subject: Re: require! Hi -- On Fri, 2 Dec 2005, Brian Buckley wrote: >> a = [1,2,3] >> x(a) # [[1,2,3,]] >> x(*a) # [1,2,3] > > x(*a) # [1,2,3] > x(a.to_a) # also [1,2,3] > > But when might the 1st way (using the unary operator) be preferred to > the more explicit 2nd way? I did leave off the to_a, though array.to_a is a no-op so it shouldn't matter. More to the point: what version of Ruby are you using? Here's the output with 1.8.3: $ cat args2.rb def x(*args) p args end a = [1,2,3] x(a.to_a) x(*a) $ ruby -v args2.rb ruby 1.8.3 (2005-09-21) [powerpc-darwin8.3.0] [[1, 2, 3]] [1, 2, 3] David -- David A. Black dblack@wobblini.net