title: How to change only elements of one array that are missing in another in Ruby?
body: <p>If I have 2 arrays, for example a = [<strong>1</strong>, 2, 3, <strong>4</strong>, 5] and b = [<strong>4</strong>, 7, 9, <strong>1</strong>]</p>
  
  <p>and I want to use a method to change elements of the first one. For example</p>
  
  <pre><code>a.map {|x| x.to_s}
  </code></pre>
  
  <p>but I don't want to change elements that are the same as in the array b.
  In this case my desire result would be</p>
  
  <pre><code>a = [1, "2", "3", 4, "5"]
  </code></pre>
  
  <p>1 and 4 are still integers, because the array b has this elements.</p>
  
  <p>So how can I implement this task?</p>
  
  <p>arrays and methods are used just for example to explain what I mean.</p>