Hal E. Fulton wrote:

>>
>>resp, data = h.get('/index.html', nil)
>>
>>try adding this line:
>>
>>data = resp.data if data.nil?
>>
>>That should make your code compatible with both versions of net/http.
> 
> 
> Ah, that's a good idea.

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.

Is this worth an RCR?


Cheers



Dave