From: Minero Aoki Date: 2003-06-06T14:31:41+09:00 Subject: Re: Ruby 1.8.0 net/http bug Hi, In mail "Re: Ruby 1.8.0 net/http bug" Dave Thomas wrote: > >>resp, data = h.get('/index.html', nil) > >> > >>try adding this line: > >> > >>data = resp.data if data.nil? > Even better perhaps would be > > class Net::HTTPOK > def to_ary > return self, body > end > end > > That way all original code should still work unchanged. But it is not only change. In 1.8, Net::HTTP#get does not raises exceptions on 4xx/5xx. Inserting Net::HTTP.version_1_1 declaration is not enough? e.g. require 'net/http' Net::HTTP.version_1_1 # forces ruby 1.6 behavior Regards, Minero Aoki