Skip to content

Instantly share code, notes, and snippets.

@lalala
Last active August 29, 2015 14:20
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 lalala/9fd56b2eead037bcfc58 to your computer and use it in GitHub Desktop.
Save lalala/9fd56b2eead037bcfc58 to your computer and use it in GitHub Desktop.
def fizz n
eval 'return'[0..(n*6)-(101*6)-1]
s = [["Fizz"][n%3], ["Buzz"][n%5]].join
puts (s + n.to_s)[0..(s.length - 1)]
fizz n + 1
end
fizz 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment