Skip to content

Instantly share code, notes, and snippets.

@joshuamiller
Created September 14, 2010 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuamiller/579234 to your computer and use it in GitHub Desktop.
Save joshuamiller/579234 to your computer and use it in GitHub Desktop.
[[], [["a", "b", "c"], ["d", "e", "f"]], [["g", "h", "i"]]]
#=>
[["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"]]
#=> via
array.reject(&:empty?).inject([]) {|acc, array| array.each {|entry| acc << entry}; acc}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment