From: Rick DeNatale Date: 2009-12-22T12:49:30+09:00 Subject: Re: Symbols vs. constants? On Mon, Dec 21, 2009 at 8:15 PM, Young H. wrote: > On Tue, Dec 22, 2009 at 9:07 AM, Gennady Bystritsky > wrote: >> Constants are variables that can be assigned to any object (only once). > > 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? > Yes. You might say that Ruby is an example of what we called Finagle's law in engineering school back n the 70s. Finagle's law states that "all constants are variable!" -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale