title: Strange Ruby error with Net::HTTP.get
body: <p>I have the following Ruby code:</p>
  
  <pre><code>require 'net/http'
  require 'uri'
  
  include Net
  
  $DEBUG = 1
  
  print "Enter a GitHub username: "
  username = gets
  
  puts "Username = #{username}" if $DEBUG == 1
  
  source = HTTP.get(URI.parse("http://github.com/api/v2/xml/user/show/#{username}"))
  
  puts source if $DEBUG == 1
  </code></pre>
  
  <p>Whenever I run it, I get the following error:</p>
  
  <pre><code>Exception `Errno::EAGAIN' at /usr/local/lib/ruby/1.9.1/net/protocol.rb:135 - Resource temporarily unavailable - read would block
  </code></pre>
  
  <p>Even though it works fine. Any ideas as to why this is happening and how to stop it happening?</p>
  
  <p>Thanks in advance!</p>
  
  <p><em>EDIT</em>: Using <a href="https://github.com/htty/htty" rel="nofollow">htty</a>, I was able to connect to the desired server and get the resource just fine without any errors.</p>