From: Robert Klemme Date: 2005-01-28T01:10:56+09:00 Subject: Re: Duping a class causes error "Trans" schrieb im Newsbeitrag news:1106841626.063762.97840@f14g2000cwb.googlegroups.com... > Correct! Yippieh! > Unfortunately you were a minute late on the buzzer so we can only off > you the consolation prize --a virtual pat on the back. "pat, pat" :-) Darn... > But seriously, thanks robert, your questioning spurred me to dig in and > find the problem. And its a good thing to remember! Glad I could help. Btw, why is it that you dup classes? It seems strange to me and there might some dangers, especially if those classes to be duped refer each other: >> class Foo; end => nil >> class Bar; XX = Foo; end => Foo >> Bar::XX => Foo >> Bar::XX == Foo => true >> bd = Bar.dup => # >> bd::XX => Foo >> bd::XX == Foo => true >> class Box; def test() Foo; end end => nil >> Box.new.test => Foo >> Box.dup.new.test Even Marshal doesn't help: => Foo>> Marshal::load(Marshal::dump(Box)).new.test == Foo => true >> Marshal::load(Marshal::dump(Bar))::XX == Foo => true Kind regards robert