2010/5/26 Dagnan <dagnan / gmail.com>:
> - with my system install of Ruby (1.8.7) I don't have this problem...
Strange. Ruby 1.8.7p248 raises EOFError on my environment.
% ruby-1.8.7p248 -ve "
require 'net/http'
require 'net/https'
require 'uri'
url = URI.parse('https://www.google.com')
res = Net::HTTP.start(url.host, url.port) { |http|
http.get('/')
}
"
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]
/home/ruby/187p248/lib/ruby/1.8/net/protocol.rb:135:in `sysread': end
of file reached (EOFError)
from /home/ruby/187p248/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
from /home/ruby/187p248/lib/ruby/1.8/timeout.rb:62:in `timeout'
from /home/ruby/187p248/lib/ruby/1.8/timeout.rb:93:in `timeout'
from /home/ruby/187p248/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
from /home/ruby/187p248/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /home/ruby/187p248/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:2024:in
`read_status_line'
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:2013:in `read_new'
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:1050:in `request'
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:772:in `get'
from -e:8
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:543:in `start'
from /home/ruby/187p248/lib/ruby/1.8/net/http.rb:440:in `start'
from -e:7
--
Tanaka Akira