Filter out array values that result in errors : <p>Basically I have 2 data structures. For simplicity lets suppose they are both 1 dimensional arrays. Assuming all functions are defined correctly, I want to do something like </p>

<pre><code>Array1.delete_if(Array2.find(element in array 1) results in error)
</code></pre>

<p>I have no idea how to approach this. I've tried rescue statements and the such but I still end up with errors. Is there an efficient and easy way to filter out elements in an array based on if a method call results in an error? </p>

<p>Thanks. </p>
