title: why is this not working, undefined blank for string in ruby
body: <p>I have the following:</p>
  
  <pre><code>  input = gets.chomp
    basket = input.strip.split(',')
    basket.delete_if(&amp;:blank?)
  </code></pre>
  
  <p>which should allow you to do: <code>cat, dog,,</code></p>
  
  <p>from there we can split that up, strip it clean and split it on <code>,</code> and then check for empty elements and remove them.</p>
  
  <p>but this code gives me an error: <code>delete_if: undefined method 'blank?' for "cat":String (NoMethodError)</code> which does not make any sense to me. I thought that the whole purpose of blank? or empty? was to say remove this element if this is true.</p>