From: Robert Klemme Date: 2007-03-03T02:15:10+09:00 Subject: Re: Smallest FizzBuzz program On 02.03.2007 18:00, Rimantas Liubertas wrote: >> 1.upto(100){|i|p"FizzBuzz#{i}"[i%3<1?0:i%5<1?4:8,i%15<1?8:4]} >> >> Shaves off 3 bytes. :) > > But it messes with the output a bit... > You can save one byte doing this: 1.upto(?d) ?d.times{|i|puts"FizzBuzz#{i}"[i%3<1?0:i%5<1?4:8,i%15<1?8:4]} Hm... robert