From: Eric Mahurin Date: 2005-09-12T05:53:49+09:00 Subject: Re: Array#[]= --- Daniel Schierbeck wrote: > I'm writing a class representing a coordinate system, and I > want to be > able to give a point in the system a value (eg. a label). The > problem is > that the system can have a variable number of dimensions. If > it just had > three, I could write: > > def []= (x, y, z, value); end > > But this being an N-dimensional coordinate system, I have to > come up > with something else. The most logical solution to me is this: > > def[]= (*coordinates, value); end > > But this gives a syntax error. Am I way off base, or would it > be useful > if variable length argument lists could be written this way? Coincidentally, I was just writing an RCR for this one. It is #315. I'm also writing the corollary to this one which is to be able to call a method with more arguments after the splat (also applies to multi-assigns). __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com