Skip to content

Instantly share code, notes, and snippets.

@benubois
Created March 9, 2010 09:16
Show Gist options
  • 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