title: How do I remove punctuation from a array in ruby?
body: <p>I need to write a method that, given a sentence, returns an array containing every other word. Punctuation needs to be removed from the word. I can get it to return every other word but I'm stuck at removing punctuation. This is what I wrote so far:</p>
  
  <pre><code>def alternate_words(str)
    return_array = []
    str.split.map.each_slice(2) do |x, y|
      return_array &lt;&lt; x
    end
  end
  </code></pre>