Dominik Werder <dwerder / gmx.net> wrote in message news:<oprp1eimanjh6mnk / mail.gmx.net>...
> Hi there,
> 
> I need to dump some objects but they have references to files. These 
> references are not important and could be discarded before serialization so 
> that no TypeError raises. But if I write my _dump method to do this, I need 
> to make the complete serialization on my own :(((
> Is there a way to mark variables not to be marshaled?
> How do you solve this problem?
> 
> thanks!
> Dominik

You could try getting rid of the TypeError like this:

class File
  def _dump(depth)
    ""
  end
  class <<self
    def _load(str)
      nil
    end
  end
end

Stephen.
+- S.D.Sykes - www.stephensykes.com - +358 50 577 3879 -
ruby -e '_=2;"||_25~!A59(1A~47!K~#-6<.A~".scan(/./){
putc$&>$`?$/:_+=$&[0]-?4}'