From: MenTaLguY Date: 2007-03-08T06:04:49+09:00 Subject: Re: Can't Marshal.dump a Java object (from using Rjb) On Thu, 8 Mar 2007 03:13:33 +0900, Wes Gamble wrote: > If Rjb returned a named class instead of an anonymous one, would I then > be able to marshal it? No, not at this time. It isn't even technically feasible to implement unless the Java object being wrapped belongs to a class which supports Java serialization (i.e. implements java.io.Serializable). > BTW, why can't anonymous classes be dumped? A class name is required by Ruby's marshal format, since otherwise there would be no way to determine which class to use when loading the marshalled object. Remember that a dumped object may be loaded in a different interpreter instance than the one that dumped it. -mental