Changes

Ruby Variable Scope

22 bytes added, 21:18, 30 November 2007
Ruby Constant Scope
== Ruby Constant Scope ==
Ruy Ruby constants are values which, once assigned a value, should not be changed. I say should because Ruby differs from most programming languages in that it allows a constant value to be changed after it has been declared, although the interpreter will protest slightly with a warning message.
Constants declared within a class or module are available anywhere within the context of that class or module. Constants declared outside of a class or module are assigned global scope.