From: Phlip Date: 2008-08-18T12:21:44+09:00 Subject: Re: Security in use of contants loolek wrote: > "What kind of bad thing can you do with Ruby constants? " > > I think this is not the question of ruby. Imagine this -> there is a > constant that holds the value that triggers the cooler sticks in a > nuclear power plant. Than the bad guy "overwrites" it, what comes > next ? Okay, you and I are bidding for that contract. (In an imaginary, old-fashioned world where government contract bids are competitive!;) I tell them I will use a constant there. You tell them you will write unit tests for all your code. Who should get the contract? And note that, in Ruby, changing the immediate value of a constant ("immediate" meaning it is a small integer only), causes a warning. -- Phlip