Displaying 1 result from an estimated 1 matches for "marhshal".
Did you mean:
mareshal
2008 May 03
0
marshalling mechanized
...rather particular
use-case, but i figured i would report. marshalling does not work on
certain objects, in particular IO objects, and since mechanized uses
Net::HTTP it makes use of IO objects. so it turns out that it you
just do
a = WWW::Mechanize.new
page = a.get "http://nytimes.com"
Marhshal.dump(a)
you get a problem. in particular, "TypeError: can''t dump TCPSocket".
basically, don''t try to marshal a socket.
however, if we make sure to finish the http connection after each use,
then the agent can be marshalled safely. i accomplished this by
inserting:
ht...