Skip to content

Instantly share code, notes, and snippets.

@beakr
Created April 14, 2012 13:01
Show Gist options
  • Save beakr/2384282 to your computer and use it in GitHub Desktop.
Save beakr/2384282 to your computer and use it in GitHub Desktop.
Ruby transpose.
a = [:a, :b, :c]
b = [1, 2, 3]
[a, b].transpose #=> [[:a, :b, :c], [1, 2, 3]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment