Skip to content

Instantly share code, notes, and snippets.

@ryanb
Created June 9, 2010 21:54
Show Gist options
  • Save ryanb/432238 to your computer and use it in GitHub Desktop.
Save ryanb/432238 to your computer and use it in GitHub Desktop.
def morse s;26.times{|i|s.gsub!(/#{(97+i).chr}/i,%w[.- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. -- -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..][i])};s;end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment