title: Remove element from array
body: <p>I have an array in my Rails 3.1 apps that has made by several objects:</p>
  
  <pre><code>[#&lt;Hardware id: 10, brand_id: 5, model: "B4200", description: "Stampante OKI B4200", typology_id: 3, sub_typology_id: 10, created_at: nil, updated_at: nil&gt;, #&lt;Hardware id: 19, brand_id: 9, model: "JetLab", description: "JetLab - 600 ", typology_id: 5, sub_typology_id: nil, created_at: nil, updated_at: nil&gt;]
  </code></pre>
  
  <p>and I want remove one object from this array. Using Rails console, I've tried to do something such as (try to remove first object):</p>
  
  <pre><code>array.pop=#&lt;Hardware id: 10, brand_id: 5, model: "B4200", description: "Stampante OKI B4200", typology_id: 3, sub_typology_id: 10, created_at: nil, updated_at: nil&gt;
  </code></pre>
  
  <p>but it doesn't work. How can I do this?</p>
  
  <p>UPDATED: My goal isn't to pop last element on array, but a generic object (everywhere inside array) that I should find using mysql search query. </p>