First page Back Continue Last page Overview Graphics
Ruby Variable Names
The language has the following rules regarding identifier names:
- Constants/Classes begin with a capital letter.
 - Instance variables begin with @
 - Class variables begin with @@
 - Global variables begin with $
 - Local variables are lower-case, unadorned.
 
Like Java and Python, variables in Ruby act as “references” to objects which undergo automatic garbage collection.