title: Ruby delete_if block
body: <p>This is using Ruby 1.9.</p>
  
  <p>I have a delete_if block:</p>
  
  <pre><code>@logHash[date].delete_if{ | logItem | logItem.name == name }
  </code></pre>
  
  <p>Where <code>logItem.name</code> is the name of the <code>logItem</code> and <code>name</code> is the name of the <code>logItem</code> I'm looking for. This works fine, except it deletes each <code>logItem</code> with the specified <code>name</code>. Is there a way to find the first item with an equal <code>name</code> and only delete that? So if there are two logItems that have the same <code>name</code>, I only want to delete one of them. Any ideas?</p>