Skip to content

Instantly share code, notes, and snippets.

@ryanb
Forked from swhitt/morse.rb
Created June 10, 2010 17:56
Show Gist options
  • Save ryanb/433357 to your computer and use it in GitHub Desktop.
Save ryanb/433357 to your computer and use it in GitHub Desktop.
def morse s;26.times{|i|s.gsub! /#{(97+i).chr}/i,("$be5 J8G#T6P'&9Sl/,!-H0cfk"[i]-31).to_s(3).tr("12",".-")};s;end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment