M
Mitch Williams
Ran into the following problem with net http in Ruby 187 pl248
require net/http.rb
n =3D Net::HTTP.new('server-that-is-not-listening-on-port-eighty')
n.request_head('/')
Prior to this change:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=3Drev&revision=3D25851 the
above code results in an:
Errno::ECONNREFUSED: Connection refused - connect(2)
After the change I receive:
NoMethodError: undefined method `closed?' for nil:NilClass
From line 1060 of net/http.rb. It looks like the code was intended to clos=
e
sockets in the event of an error, but it assumes the socket actually exists=
require net/http.rb
n =3D Net::HTTP.new('server-that-is-not-listening-on-port-eighty')
n.request_head('/')
Prior to this change:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=3Drev&revision=3D25851 the
above code results in an:
Errno::ECONNREFUSED: Connection refused - connect(2)
After the change I receive:
NoMethodError: undefined method `closed?' for nil:NilClass
From line 1060 of net/http.rb. It looks like the code was intended to clos=
e
sockets in the event of an error, but it assumes the socket actually exists=