From: hipster Date: 2000-10-10T23:26:17+09:00 Subject: [ruby-talk:5382] Re: Allowing *ary's in the middle of a camma separated list On Tue, 10 Oct 2000 23:16:11 +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "[ruby-talk:5373] Re: Allowing *ary's in the middle of a camma separated list" > on 00/10/10, "Akinori MUSHA" writes: > > |> system 'rcsdiff', *(options+["-r#{revold}", "-r#{revnew}", "#{root}/#{file},v"]) > | > |Well, yes, that's supposed to work, but I simply do not feel it's as > |pretty as other parts of Ruby. I mean, I just couldn't explain why > |"proc(a, b, *c)" is allowed and "proc(a, *b, c)" or "proc(a, *b, *c)" > |is not, considering Ruby's consistent nature. > > It's consistent with the right hand side of assignment. Well, let me > consider it for a while. An asterisk at other places than the end sounds ok, just need to count the elements. More than one asterisk is inherently ambiguous however. Take the proc(a, *b, *c) example with parameters 1, 2, 3, 4: after a=1, how should 2, 3, 4 be distributed over *b and *c? Michel