You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fizz_buzz.rb
    path of file: ./repos/Ruby/data_structures/arrays
    
    the code of the file until where you have to start completion: # Write a program that outputs the string representation 
    
def fizz_buzz(n)
  str = []

  n.times do |i|
    i += 1
    num_str = ''

    num_str += 'Fizz' if i % 3 == 0
    num_str += 'Buzz' if i % 5 == 0

    num_str = i.to_s if num_str == ''

    str.push(num_str)
  end

  str
end