From: Josh Cheek Date: 2010-10-21T23:05:19+09:00 Subject: Re: generating random argument lists --001485f1ebdecb7d6d0493210392 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 21, 2010 at 8:34 AM, Melody Class wrote: > thanks, the elegance of these is pleasing. question remains: how to i > split that array of arrays into a list of arrays to pass to the method? > if i don't split it then my method enumerates not through an array of > arrays but through an array with only one member: the array of arrays. > In the end i refactored the method's code to say > if *args.length==1 and args[0].class==Array then args[0].each do x else > args.each do x > > but I suppose I'm curious as to whether it's possible to generate a list > of arguments > > -- > Posted via http://www.ruby-forum.com/. > > prefix the argument with a splat my_method( *array_of_arrays ) --001485f1ebdecb7d6d0493210392--