Closed jasonfranklin-stokes closed 15 years ago
You can't rely on Java objects in JRuby being Marshal#dump-able, especially when they don't implement java.io.Serializable.
This request belongs to either the JRuby list ("why can't I dump WeakReferences") or on the HtmlUnit list ("why aren't pages serializable").
browser = Celerity::Browser.new :resynchronize => true, :browser => :firefox, :log_level => :off browser.clear_cookies
browser.goto("http://www.monster.de/") page = browser.page file = Dir.pwd + "/page.dmp" File.open(file, 'w') {|f| f.write(Marshal.dump(page)) }
=> `marshal_dump': java.lang.ref.WeakReference (IOError)
removing the :resynchronize => true results in the marshal dump working properly. I guess that this has something to do with threading.