Suraj Kurapati wrote: > Florian Gilcher wrote: >> what are you trying to accomplish? Permutations maybe? >> I frankly can't think of a problem that I would solve using them. > > One application is exhaustive, brute-force unit testing. For example, > in my eRuby processor, it was necessary to test proper handling of > eRuby directives surrounded by various amounts and kinds of whitespace > (empty string, spaces, tabs, and line breaks): > > http://github.com/sunaku/ember/blob/master/test/ember/template.rb My jaw is gaping at the code I read.. Would this help at all? http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby/ -- Posted via http://www.ruby-forum.com/.