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 17:27:59 +0900, Sylvain Joyeux <sylvain.joyeux / m4x.org> writes:

|_dump is not explicitely defined on ARGF. I don't have any problem with 
|Ruby not dumping it in that case. My problem is that if _dump is defined, 
|it is because the object dumping procedure is custom anyway. If there is 
|singleton state to save, it is the programmer responsibility, not Ruby's.

I think I misread your report.  Sorry.

|> |> 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.
|While you're at it, could you explain the difference between _dump and 
|marshal_dump ? I googled a bit and found nothing ...

_dump is older API.  You have to serialize an object into a string by
yourself.  You can return any marshal-able object from marshal_dump.

							matz.