From: Brian Buckley Date: 2006-02-08T06:37:54+09:00 Subject: Re: marshalling constants ------=_Part_6874_25253000.1139348253829 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > > class A > A1 =3D new > > def self.name_for_constant obj > @name_for_constant ||=3D {} > @name_for_constant[obj] ||=3D constants.find {|c| const_get(c) =3D=3D= obj} > end > > def _dump(limit) > self.class.name_for_constant(self) > end > > def self._load(str) > const_get str > end > end Whoa. I see it works (for the A constants only as written, getting TypeErrors on A non-constants). I don't understand why it works just yet. Will examine further tonight. ------=_Part_6874_25253000.1139348253829--