out = [
["FizzBuzz", "Fizz", "Fizz", "Fizz", "Fizz"],
["Buzz"],
["Buzz"]
]
(1..100).each do | ii |
puts out[ii % 3][ii % 5] || ii
end
Thanks!PS: i am assuming this is the fastest you can do in ruby (but I suspect that blocks are expensive alas)
PS2: passing the test is interesting, having a look at the good and/or best answers would be a decent award for having tried in the first time.