Skip to content

Instantly share code, notes, and snippets.

@Arcovion
Last active August 29, 2015 14:02
Show Gist options
  • Save Arcovion/03cfc1e3494710fad064 to your computer and use it in GitHub Desktop.
Save Arcovion/03cfc1e3494710fad064 to your computer and use it in GitHub Desktop.
Ruby code golf: Pangram checker

33 chars for ruby 1.9+:

p [*?A..?Z]-gets.upcase.chars==[]

34 chars another way:

p (?a..?z).grep(/[^#{gets}]/i)==[]

35 chars for ruby 1.8:

p gets.scan(/[a-z]/i).uniq.size==26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment