From: Travis Smith Date: 2005-03-22T05:00:38+09:00 Subject: Re: YAML Parsing, ignoring objects? That did it for now. We'll see if I end up screwing things up in the future because I don't to_yaml something right. Thanks On Tue, 22 Mar 2005 04:04:53 +0900, Florian Gross wrote: > Travis Smith wrote: > > > I have a class which when YAMLized produces... > > > > --- !ruby/object:Player > > name: dude > > password: dude > > session: !ruby/object:TCPSocket {} > > thread: !ruby/object:Thread {} > > > > I'd like to figure out a way for it to just ignore the Thread and/or > > TCPSocket type. It won't choke on the socket, but it will loading up > > the Thread. Can I add a domain type that will just produce nil not > > matter what happens? > > Perhaps you can just redefine Player#to_yaml to exclude those? > > -- ~Travis