Skip to content

Instantly share code, notes, and snippets.

@sheenobu
Created November 1, 2012 14:02
Show Gist options
  • Save sheenobu/3993793 to your computer and use it in GitHub Desktop.
Save sheenobu/3993793 to your computer and use it in GitHub Desktop.
SingleLineFizzbuzz
(1..100).each { |x| puts( (eval(("'Fizz'" if x % 3 == 0).to_s + ("'Buzz'" if x % 5 == 0).to_s) or x) ) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment