title: What causes the "already initialized constant" warning?
body: <p>What's wrong with my code? Is <code>FileNameArray</code> being reused?</p>
  
  <p>f.rb:17: warning: already initialized constant FileNameArray</p>
  
  <pre><code>number = 0
  while number &lt; 99
    number = number + 1
    if number &lt;= 9
      numbers = "000" + number.to_s
    elsif
      numbers = "00" + number.to_s
    end
    files = Dir.glob("/home/product/" + numbers + "/*/*.txt")
      files.each do |file_name|
      File.open(file_name,"r:utf-8").each do | txt |
        if txt =~ /http:\/\//
          if txt =~ /static.abc.com/ or txt =~ /static0[1-9].abc.com/
          elsif
          $find = txt
          FileNameArray = file_name.split('/')
          f = File.open("error.txt", 'a+')
          f.puts FileNameArray[8], txt , "\n"
          f.close
          end
        end
      end
    end
  end
  </code></pre>