title: gsub not working throughout code snippet
body: <p>Using this code example</p>
  
  <pre><code>#!/usr/bin/ruby
  paragraph = "champion xylophone excellent"
  paragraph = paragraph.gsub("ch","tj")
  words = paragraph.split(/ /)
  words.each do |word|
     if word[0,1] == "x"
       word[0.1] = "z" 
     end
  end
  paragraph = words.join(" ")
  paragraph.gsub("x","ks")
  print paragraph
  </code></pre>
  
  <p>The output will be 'tjampion zylophone excellent' rather than 'tjampion zylophone ekscellent'</p>
  
  <p>The same applies if the gsub is applied within the each to the individual words. I don't understand why it acts at the beginning but not at the end.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Second case is a distinct issue from the first:</p>
  
  <pre><code>#!/usr/bin/ruby
  paragraph = "champion xylophone excellent"
  paragraph = paragraph.gsub("ch","tj")
  words = paragraph.split(/ /)
  words.each do |word|
     if word[0,1] == "x"
       word[0.1] = "z" 
     end
     word = word.gsub("x","ks")
  end
  paragraph = words.join(" ")
  print paragraph
  </code></pre>