From: Urban Nilsson Date: 2003-06-06T02:54:03+09:00 Subject: Ruby 1.8.0 net/http bug I tried the following example code: require 'net/http' h = Net::HTTP.new('www.pragmaticprogrammer.com', 80) resp, data = h.get('/index.html', nil) puts "Code = #{resp.code}" puts "Message = #{resp.message}" resp.each {|val, key| printf "%-14s = %-40.40s\n", key, val } p data[0..55] This ran as expected under ruby 1.6.7 (2002-03-01) [powerpc-darwin6.0] but when I ran it under ruby 1.8.0 (2003-05-26) [powerpc-darwin6.6] the data variable was nil, resulting in a "net.rb:8: undefined method `[]' for nil (NoMethodError)". resp was the same under both versions however. What can I do to narrow this problem down? ---- Urban Nilsson, http://bonk.nu/blog 'What we in the West call "bugs", the Japanese call "spoilage". I find this nomenclature honest and refreshing. "Bug" implies that the problem is some independent agent, when in fact the problem is the "spoiled" code itself.' -- Handy Vandal