title: ruby - insert an array into initialize method - undefined method `join' for :String (NoMethodError)
body: <p>I try to pass an array as argument and use it in my ERB file.</p>
  
  <pre><code>class Erbfile
    def initialize ec2
      @ec2 = ec2
      #@ec2 = ["Cleveland", "Denver", "Nashville"] #this one work
      @template = File.read('./file.erb')
    end
    def render
        ERB.new(@template).result( binding )
    end
  end
  
  ec2=[]
  ec2.instances.each do |instance|
    tag_name = Facter::Util::Resolution.exec("...")
    mystring = "#{tag_name}"
    ec2 &lt;&lt; mystring
    puts "#{ec2_without_tags}"        ### ["test.ec2.mycomany.int"]
    @page = Erbfile.new("#{ec2}")
  end
  </code></pre>
  
  <p>I use in the ERB file:</p>
  
  <pre><code>&lt;th&gt; &lt;%= @ec2.join('&lt;br /&gt;') %&gt; &lt;/th&gt;
  </code></pre>
  
  <p>And i get an error:</p>
  
  <pre><code>(erb):20:in `render': undefined method `join' for "[\"test.ec2.mycomany.int\"]":String (NoMethodError)
  Did you mean?  JSON
  </code></pre>
  
  <p>but if I will insert an array manually into the initialize method, it will work.</p>
  
  <pre><code>@ec2 = ["Cleveland", "Denver", "Nashville"]
  </code></pre>
  
  <p>What am I doing wrong ?</p>