--Boundary-00
Z3YGrWwbOouLYM
Content-Type: Multipart/Mixed;
  boundaryoundary-00
Z3YGrWwbOouLYM"

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: text/plain;
  charsettf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Attached are my 7 attempts. Some are ok, some are crap. No golfing.


-- 
Jesse Merriman
jessemerriman / warpmail.net
http://www.jessemerriman.com/

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_0.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_0.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_0.rb

Fizz  
Buzz  
FizzBuzz  izz * Buzz

(1..100).each do |x|
  if    (x % FizzBuzz).zero? then puts 'FizzBuzz'
  elsif (x % Fizz).zero?     then puts 'Fizz'
  elsif (x % Buzz).zero?     then puts 'Buzz'
  else                            puts x
  end
end

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_4.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_4.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_4.rb

Fizz  
Buzz  
FizzBuzz  izz * Buzz

class Integer
  def fizzbuzz
    if    (self % FizzBuzz).zero? then 'FizzBuzz'
    elsif (self % Fizz).zero?     then 'Fizz'
    elsif (self % Buzz).zero?     then 'Buzz'
    else                          to_s
    end
  end
end

(1..100).each { |x| puts x.fizzbuzz }

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_2.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_2.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_2.rb

Fizz  
Buzz  

arr  rray.new(100) do |i|
  x   + 1
  if (x % Fizz).zero?
    if (x % Buzz).zero? then 'FizzBuzz'
    else                     'Fizz' end
  elsif (x % Buzz).zero? then 'Buzz'
  else                        x end
end

arr.each { |e| puts e }

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_1.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_1.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_1.rb

Fizz  
Buzz  

(1..100).each do |x|
  if (x % Fizz).zero?
    if (x % Buzz).zero? then puts 'FizzBuzz'
    else                     puts 'Fizz' end
  elsif (x % Buzz).zero? then puts 'Buzz'
  else                        puts x end
end

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_5.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_5.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_5.rb

class Integer
  def fizzbuzz arr, str
    arr.each_with_index do |x, i|
      arr[i]  (i+1) % self).zero? ? str : x
    end
  end
end

arr  1..100).to_a
3.fizzbuzz arr, 'Fizz'
5.fizzbuzz arr, 'Buzz'
15.fizzbuzz arr, 'FizzBuzz' # Must be last.

arr.each { |x| puts x }

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_6.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_6.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_6.rb

FB  ambda { |mod, str| lambda { |x| (x % mod).zero? ? str : x } }
Fizz      B[3,  'Fizz']
Buzz      B[5,  'Buzz']
FizzBuzz  B[15, 'FizzBuzz']

# Note that this wouldn't work if the numbers to_s'd got longer than their
# fizz-buzzed strings.
(1..100).each do |x|
  puts([Fizz[x], Buzz[x], FizzBuzz[x]].max do |a,b|
    a.to_s.length <b.to_s.length
  end)
end

--Boundary-00
Z3YGrWwbOouLYM
Content-Type: application/x-ruby;
  nameb_3.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenameb_3.rb"

#!/usr/bin/env ruby
# Ruby Quiz 126: FizzBuzz
# fb_3.rb

Fizz  
Buzz  
FizzBuzz  izz * Buzz

class Fixnum
  alias :old_to_s :to_s
  def to_s; (self % FizzBuzz).zero? ? 'FizzBuzz' :
            (self % Fizz).zero?     ? 'Fizz' :
            (self % Buzz).zero?     ? 'Buzz' :
                                      old_to_s
  end
end

# Peter Seebach's suggestion.
(1..100).each { |x| p x }

--Boundary-00
Z3YGrWwbOouLYM--
--Boundary-00
Z3YGrWwbOouLYM--