From: Robert Klemme Date: 2007-08-08T23:04:49+09:00 Subject: Re: non-constant strings 2007/8/8, Kaldrenon : > On Aug 8, 7:51 am, "Jano Svitok" wrote: > > On 8/8/07, Dmitry Bilunov wrote: > > > If there is a way to unfreeze a frozen > > > object, then this method could be called externally and one can gain > > > write access to an internal instance variable. > > > > Not exactly. > > Shortest, closest thing I can think of for unfreezing an object is to > dup it. > > a = "test" --> "test" > a.freeze --> 1 > a << "test" --> TypeError > a = a.dup --> 1 > a << "test" --> "testtest" Just to make it clear: this is not unfreezing - it will just create a new instance that is not frozen so the original is still safe. > (sorry about the non-irb format...default command shell in WinXP > doesn't allow copy/paste. *sigh*) You can copy and past from any Windows command line shell. You can even configure it so you can directly mark with the mouse and copy by pressing enter. Kind regards robert