From: aurelianito Date: 2005-10-11T04:41:52+09:00 Subject: Re: Method added hook I can always override dup to freeze the duplicated object. Is it right? can I break other things in the Ruby library? > Besides, you can dup a frozen object and alter it (but clone gives you > a still frozen object) > > class Foo > def bar > print "bar" > end > end > > Foo.freeze > Foo2=Foo.dup > > class Foo2 > def Foo2.bar > print "bar in Foo2" > end > end > p Foo2.bar > > > > > I've tried it, but there is no unfreeze method :S. And I need to be > > able to halt the redefinition SOME TIMES and some times NOT.