Skip to content

Instantly share code, notes, and snippets.

@allenluce-zz
Created November 6, 2012 23:28
Show Gist options
  • Save allenluce-zz/4028449 to your computer and use it in GitHub Desktop.
Save allenluce-zz/4028449 to your computer and use it in GitHub Desktop.
a = 'abcdefghijklnopqrstuvwxyz'
last_c = ' '
a.split('').each {|c|
raise unless last_c < c
last_c = c
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment