aerijman
aerijman

Reputation: 2782

How do I zip multiple arrays in ruby

How do I zip 3 or more arrays in ruby?

A = ['a','b']
B = ['c','d']
C = ['e','f']

A.zip(B).zip(C) is not optimal.

Upvotes: 1

Views: 401

Answers (1)

aerijman
aerijman

Reputation: 2782

Easier than expected...

A.zip(B,C)

Upvotes: 4

Related Questions