Ruby/Array/transpose

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

transpose method

d2 = [ ["January", 2007], ["February", 2007], ["March", 2007] ]
d2.transpose # => => [["January", "February", "March"], [2007, 2007, 2007]]