Skip to content

Instantly share code, notes, and snippets.

@oldergod
Last active August 29, 2015 14:09
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 oldergod/0b68eec9bee4c68e35f3 to your computer and use it in GitHub Desktop.
Save oldergod/0b68eec9bee4c68e35f3 to your computer and use it in GitHub Desktop.
Ruby inline with before and after blocks
ls | ruby -ne 'BEGIN{puts("lets go");$array = []};$array << $_.chomp;END{puts $array.inspect;puts "finished"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment