Skip to content

Instantly share code, notes, and snippets.

@vesan
Forked from nakajima/99_bottles.rb
Created March 4, 2009 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vesan/73861 to your computer and use it in GitHub Desktop.
Save vesan/73861 to your computer and use it in GitHub Desktop.
[*1..99].reverse.each do |i|
phrase = ["#{i} bottles of beer on the wall",
"#{i} bottles of beer",
"You take one down",
"You pass it around",
"#{i - 1} bottles of beer on the wall.."].join(".. ")
`say #{phrase}`
end
loop do
phrase = [
"This is the song that never ends",
"Yes it goes on and on my friend",
"Some people, started singing it",
"not knowing what it was",
"And they'll continue singing it forever just because"
].join('.. ')
`say "#{phrase}"`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment