title: How to replace the characters in a string
body: <p>I have a method that I want to use to replace characters in a string:</p>
  
  <pre><code>def complexity_level_two
    replacements = {
        'i' =&gt; 'eye', 'e' =&gt; 'eei',
        'a' =&gt; 'aya', 'o' =&gt; 'oha'}
    word = "Cocoa!55"
    word_arr = word.split('')
    results = []
    word_arr.each { |char|
      if replacements[char] != nil
        results.push(char.to_s.gsub!(replacements[char]))
      else
        results.push(char)
      end
    }
  end
  </code></pre>
  
  <p>My desired output for the string should be: <code>Cohacohaa!55</code></p>
  
  <p>However when I run this method it will not replace the characters and only outputs the string:</p>
  
  <pre><code>C
  o
  c
  o
  a
  !
  5
  5
  </code></pre>
  
  <p>What am I doing wrong to where this method will not replace the correct characters inside of the string to match that in the <code>hash</code> and how can I fix this to get the desired output?</p>