From: Rick DeNatale Date: 2009-05-19T01:34:02+09:00 Subject: Re: permute each element of a ragged array? On Mon, May 18, 2009 at 12:15 PM, Phlip wrote: > Rick DeNatale wrote: > >>   assert permutations, 0, %w( android insane phenomenauts ) > > Is that a typo? It should be just assert permutations[0] ==, or maybe just > assert permutations[0].include?(...). > > I will report what I figure out. Tx y'all! > > There have been times when I would have answered an array manipulation > question here with brute-force, and someone else comes back with some slick > oneliner like *array.map(&:partition).etc, so I don't want to miss any > possible simplifications here! That's why I offered the question as a case > study... No, it's not the Test::Unit assert, I wrote a customized version to illustrate why just because an element isn't in the 'right' place doesn't mean that it's wrong, since you had asserted that order doesn't matter. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale