Created
May 5, 2013 13:31
-
-
Save kirikiriyamama/5520853 to your computer and use it in GitHub Desktop.
文字列結合でFizzBuzzワンライナー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.upto(100) { |i| puts (s = (i % 3 == 0 ? 'Fizz' : '') + (i % 5 == 0 ? 'Buzz' : '')).empty? ? i : s } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment