Skip to content

Instantly share code, notes, and snippets.

@wilson
Created November 14, 2009 19:28
Show Gist options
  • Save wilson/234710 to your computer and use it in GitHub Desktop.
Save wilson/234710 to your computer and use it in GitHub Desktop.
x,y,z = "X ", "Y ", "Z "
[x,y,z].each_with_index do |str, i|
str << str[0,1]
p str
redo if i == 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment