From: Devin Mullins Date: 2005-09-12T03:25:49+09:00 Subject: Re: Array#[]= Daniel Schierbeck wrote: > 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? Yes, that would be useful. It has been discussed many-a-time, before, too. :) For now, you'll have to implement your own solution in-method: def []= *args cords, value = args[0..-2],args[-1] #... end Personally, I'd also like to see this: def []= x, y, value #... ordef x, y, z, value #... ordef *args #gets here only if neither of the first two match #... end But none of this exists. So live with it. :) (I'd say, "Go write an RCR," but I can't imagine that 3 don't exist already.) Devin