Skip to content

Instantly share code, notes, and snippets.

@rrguntaka
Created November 9, 2011 20:57
Show Gist options
  • Save rrguntaka/1352994 to your computer and use it in GitHub Desktop.
Save rrguntaka/1352994 to your computer and use it in GitHub Desktop.
Split Ruby array
a.each_slice(n).to_a
#Source: http://snippets.dzone.com/posts/show/3486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment