From: "Eric I." Date: 2007-06-04T05:40:32+09:00 Subject: Re: FizzBuzz (#126) [SOLUTION] Here's my solution. It makes heavy use of the Ruby idiom of using the && and || operators to perform conditionals because a) they are short- circuited and because b) && returns the right-hand-side when the left- hand-side is a true value. ==== class Integer; def factor? n; self % n == 0; end; end puts (1..100).map { |i| i.factor?(15)&&"FizzBuzz" || i.factor? (3)&&"Fizz" || i.factor?(5)&&"Buzz" || i } ==== Eric Are you interested in on-site Ruby training that uses well-designed, real-world, hands-on exercises? http://LearnRuby.com