On Mon, Jun 25, 2012 at 9:06 PM, skolo pen <[email protected]> wrote:
> What method could I use to do the following: > > people = ["person1","person2","person3"] > > issue = ["issue1","issue2","issue3","issue4","issue5","issue6"] > > person1 => issue1 > > person2 => issue2 > > person3 => issue3 > > person1 => issue4 > > person2 => issue5 > > person3 => issue6 > > people.cycle.take(issue.size).zip(issue) Note that this will produce an array of arrays. A Hash doesn't work for this because any given key can only appear once. -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
