From: Ludwigi Beethoven Date: 2003-06-22T22:19:14+09:00 Subject: Re: Trying to use Net::HTTP sample program from "The Ruby Way" --- daz wrote: > > "Minero Aoki" wrote: > > Ludwigi Beethoven wrote: > > [snip patch] > > I noticed you're on Win, so if you can't patch ... > > Edit \ruby\lib\ruby\1.8\net\http.rb > (backup first ?) > > nearer the end at line 1603 you should see ... > > > --------------------------------------------------- > def inspect > "#<#{self.class} #{@code} readbody=#{@read}>" > end > > # > # response <-> exception relationship > # > > def code_type > > --------------------------------------------------- > > Add the new 'to_ary' method so that it looks like > ... > > > --------------------------------------------------- > def inspect > "#<#{self.class} #{@code} readbody=#{@read}>" > end > > def to_ary > [self, body()] > end > > # > # response <-> exception relationship > # > > def code_type > > --------------------------------------------------- > > Works for me, > > #-> Retrieved 20 lines, 232 bytes > > > > daz Thank you guys for your help. I added the to_ary to http.rb and my pgm is now working. Now to the next step. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com