From: "David A. Black" Date: 2009-12-22T10:05:51+09:00 Subject: Re: Symbols vs. constants? Hi -- On Tue, 22 Dec 2009, Sonja Elen Kisa wrote: > How are symbols and constant (capitalized) strings similar or > dissimilar? They both seem to be used to store text that is not intended > to change. In what situations should I use one or the other? How should > I separate them in my brain? A constant is an identifier to which you can assign an object. It is not, itself, an object. X = "hi" # X is a constant, "hi" is an object (a string) A symbol is an object. You can't assign to it; it's not an l-value. David -- David A. Black Senior Developer, Cyrus Innovation Inc. THE COMPLEAT RUBYIST, Ruby training with Black/Brown/McAnally! January 22-23, Tampa, Florida Info and registration at http://www.thecompleatrubyist.com