title: Is there a workaround to open URLs containing underscores in Ruby?
body: <p>I'm using open-uri to open URLs. </p>
  
  <pre><code>resp = open("http://sub_domain.domain.com")
  </code></pre>
  
  <p>If it contains underscore I get an error:</p>
  
  <pre>
  URI::InvalidURIError: the scheme http does not accept registry part: sub_domain.domain.com (or bad hostname?)
  </pre>
  
  <p>I understand that this is because according to RFC URLs can contain only letters and numbers. Is there any workaround?</p>