From: Jeff Moore Date: 2008-08-24T09:41:16+09:00 Subject: Array.shuffle/Array.shuffle! This works but I can't escape the nagging sense that there's a more concise approach (for one thing, it looks like there are way too transient objects to me). Anyone have a better idea? class Array def shuffle t_self = self.dup t_size = self.size result=[] t_size.times { result << t_self.slice!(rand(t_self.size)) } result end def shuffle! t_self = self.dup t_size = self.size self.clear t_size.times { self << t_self.slice!(rand(t_self.size)) } self end end Regards... -- Posted via http://www.ruby-forum.com/.