title: NoMethodError: undefined method `join'
body: <p>So Here's the Ruby code I'm working on: </p>
  
  <pre><code>def translate(x)
   array = x.split(" ")
    array.each do |y|
      if y.match(/^[aeiou]/)
        y += "ay"
      else 
        until y.match(/^[aeiou]/) do
          var = y[/^[^aeiou]*/]
          y.slice! /^[^aeiou]*/
          y += (var + "ay")
        end
      end
    x = y.join(" ")
    x
  end
  end
  </code></pre>
  
  <p>There's an issue when I test it. It's this: </p>
  
  <pre><code>NoMethodError:
         undefined method `join' for "appleay":String
  </code></pre>
  
  <p>Not at all sure what the matter with my join method is. </p>