From: MonkeeSage Date: 2006-09-16T05:30:55+09:00 Subject: Re: arbitrary indexes Jason Nordwick wrote: > given that Array[int,int] is already taken syntax, Array[Array] is > perfectly acceptable syntax for arbitrary list indexing, even if > the immediate form might look a little ugly: a[[1,3,4,5,7]]. The second implementation I posted allows for that. But you should realize that an array and an argument list are not quite the same thing, since arrays can be arguments in the argument list. How would ruby know (on any given method) whether you meant method(array, int) [an array as an argument in the list] or method(array) [array as the argument list]. You can always implement the functionality yourself when you have a specific criterion on which to differentiate between the two (as I did in the second implementation above, viz., one argument which is an instance of array -- but that is only a convention I've supplied; not something that ruby could know automatically). Regards, Jordan