From: Yukihiro Matsumoto Date: 2007-03-20T11:40:06+09:00 Subject: Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined 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 11:32:22 +0900, "Chris Carter" writes: |> Because objects with singleton data can not be shared across |> processes. Objects in marshaled data can live longer than processes. |> In this case, how can we tell the object t work properly without @bla |> variable set? |But what if that singleton class just contained a method that allowed |direct access to a variable, or a quick hack to mutate something, |should those methods make it so it cannot be dumped. Can't the |interpreter just assume we know what we are doing? 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. You can define its own marshal_dump method if you really want to dump the object. matz.