Ruby Issue Tracking System: Issues
https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2010-02-22T21:26:25Z
Ruby Issue Tracking System
Redmine
Backport187 - Backport #2779 (Closed): Net::HTTP#get raises NoMethodError
https://bugs.ruby-lang.org/issues/2779
2010-02-22T21:26:25Z
sdsykes (Stephen Sykes)
sdsykes@gmail.com
<p>=begin<br>
I think this was introduced in Revision 25851:</p>
<p>require 'net/http'<br>
nh = Net::HTTP.new("does_not_exist_at_all.com")<br>
nh.get("/")<br>
NoMethodError: undefined method <code>closed?' for nil:NilClass from /usr/local/lib/ruby/1.8/net/http.rb:1060:in </code>request'<br>
from /usr/local/lib/ruby/1.8/net/http.rb:772:in `get'<br>
from (irb):11<br>
from /usr/local/lib/ruby/1.8/net/http.rb:2042<br>
=end</p>