Skip to content

Instantly share code, notes, and snippets.

@nakajima
Forked from patmaddox/99_bottles.rb
Created March 2, 2009 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nakajima/72618 to your computer and use it in GitHub Desktop.
Save nakajima/72618 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