Last active
December 17, 2015 00:29
-
-
Save kirikiriyamama/5520862 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 = "#{['Fizz'][i % 3]}#{['Buzz'][i % 5]}").empty? ? i : s } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment