From: James Edward Gray II Date: 2009-12-22T13:03:00+09:00 Subject: Re: Symbols vs. constants? On Dec 21, 2009, at 7:57 PM, Walton Hoops wrote: >> -----Original Message----- >> From: Young H. [mailto:armywide@gmail.com] >> Hi, >> >> It seems to me a constant can be changed during the runtime. >> >>> Z="hello" >> => "hello" >>> Z=1234 >> (irb):11: warning: already initialized constant Z >> => 1234 >>> Z >> => 1234 >> >> So does it mean, it can be changed, but not encouraged? > > In fact it is greatly discouraged. There is never, ever > a reason to change a constant once it is set. I'm not sure we should go quite THAT far. It is used in the wild for features people do like. There are also ways to do it without a warning. James Edward Gray II