From: Xavier Noria Date: 2010-07-13T21:59:25+09:00 Subject: Re: Shouldn't this be called a global constant? On Tue, Jul 13, 2010 at 2:42 PM, Abder-Rahman Ali wrote: > In "why's poignant guide to Ruby" book, it mentioned that: $LOAD_PATH is > a global variable. Isn't this a global "constant"? Not really. Ruby has no concept of local constants, they are global by definition. Constants can't start with a dollar, they must begin with a capital letter. To say you want a particular variable to be global you use the sigil. Global variables are distinguished by the leading dollar sign, and have no requirement about the case used in the identifier. There's for example $stdout. Constants in addition belong to classes and modules, so they may have qualified names like ActiveRecord::Base. That means: the object stored in the constant Base, that is stored in the object that is stored in the constant ActiveRecord, which happens to be a module. Variables, either local or global, have no namespaces.