title: Rescue NameError but not NoMethodError
body: <p>I need to catch a NameError in a special case. But I don't want to catch all SubClasses of NameError. Is there a way to achieve this?</p>
  
  <pre><code># This shall be catched
  begin
    String::NotExistend.new
  rescue NameError
    puts 'Will do something with this error'
  end
  
  # This shall not be catched
  begin
    # Will raise a NoMethodError but I don't want this Error to be catched
    String.myattribute = 'value'
  rescue NameError
    puts 'Should never be called'
  end
  </code></pre>