From: Phlip Date: 2008-02-05T05:48:39+09:00 Subject: Re: Expanding arrays in method calls - why the restriction? mathew wrote: > system('du', *opts, '/tmp') > > which seems to me like a reasonable thing to want to do. system('du', *[opts + '/tmp']) In Ruby, never underestimate the power of the splat operator. > Is there some technical reason why the * parameter has to be the last > one in the argument list, given that the array must be of finite size > anyway, and presumably it gets expanded out in the process so that the > receiver doesn't know an array was involved? I can't think of a reason either - the splat does evaluate before the method call. Maybe it's just symmetry with the internal argument splat, which must cohabit with default values and &block, so it must come relatively last. -- Phlip