From: Rick DeNatale Date: 2007-03-03T09:05:55+09:00 Subject: Re: Smallest FizzBuzz program On 3/2/07, Martin DeMello wrote: > On 3/3/07, Brian Adkins wrote: > > > > Nice work. I removed ,x from |i,x| on a whim and it still works - 57 > > bytes! (you have to count file size which as an EOF char) > > > > 1.upto(?d){|i|i%3<1&&x=:Fizz;puts i%5<1?"#{x}Buzz":x||i} > > Slight variant, though sadly the same length: > > 1.upto(?d){|i|puts ["%sBuzz"%x=[:Fizz][i%3]][i%5]||x||i} > > martin 1.upto(?d){|i|p ["%sBuzz"%x=[:Fizz][i%3]][i%5]||x||i} Code golfing is against my religious beliefs however. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/