From: Mark Wilden Date: 2008-05-23T21:56:40+09:00 Subject: Re: Prevent ruby constant variables from changing? On May 22, 2008, at 11:33 PM, Florian Gilcher wrote: >>> If you noticed, class names are constants. As you can change >>> classes at runtime, constants must be changable. >>> Actually overwriting Constants emits a warning. A you should >>> program warnings-free, that should be no problem :). >> >> Sure, you can change classes at runtime, but should you be able to >> change which object is referenced by a class name? I haven't heard >> of that before. Do you have a real-world example of someone doing >> that? Just curious. >> >> ///ark >> > > "Hot code replace" comes to my mind. Completely reloading a class > while keeping the system running. There, it makes sense to > completely obliterate the old class. You're not really loading a different class - you're just updating the current class, which could be done more tediously by redefining its methods and reinitializing its attributes. But I see what you mean, and you're right. ///ark