Hi,

In message "Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined"
    on Tue, 20 Mar 2007 16:45:32 +0900, Sylvain Joyeux <sylvain.joyeux / m4x.org> writes:

|> I am not sure if we know what we are doing here.  Dumping objects
|> without singleton information may trigger serious problems, that can
|> happen too easily.
|I don't see why as soon as the dumping/loading is done by user code. I 
|defined _dump, if the singleton state is important, it is my job to save 
|it anyway. So ...

In most of my use case, singleton behavior/attribute is fundamental to
the object.  For example, ARGF is an instance of plain Object, even if
it works like an IO.  I don't want get an empty object when I dumped
ARGF.  I'd rather get an error.

But at least I agree there could be better recovery from error than now.

|> You can define its own marshal_dump method if you really want to dump
|> the object.
|No you can't, or I wrongly guessed how marshal_dump should be defined 
|(marshal_dump and _dump are really not documented enough)

My mistake.  Now I think it should behave so.  Will fix.

							matz.