-
Book Overview & Buying
-
Table Of Contents
Polished Ruby Programming - Second Edition
By :
Almost all objects in Ruby support instance variables. As mentioned in Chapter 1, Getting the Most out of Core Classes, the exceptions are the immediate objects: true, false, nil, integers, floats, and symbols. The reason the immediate objects do not support instance variables is that they lack their own identity. Ruby is written in C, and all Ruby objects are stored using the C VALUE type. VALUE usually operates as a pointer to another location in memory. For most objects you create that have instance variables, the object's instance variables will be stored near that memory location.
Immediate objects are different from other objects in that their VALUEs are not pointers. Immediate objects contain all information about the object in a single location in memory that is the same size as a pointer. This means there is no space for them to contain references to instance variables.
Unlike most other objects, there are no separate instances...
Change the font size
Change margin width
Change background colour