Skip to content

Instantly share code, notes, and snippets.

@benubois
Created March 9, 2010 09:16
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 benubois/326424 to your computer and use it in GitHub Desktop.
Save benubois/326424 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# Block sort in ruby
content = STDIN.read
lines = content.split(/\n\n+/).sort
lines.each { |line| puts line + "\n\n" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment