DAB wrote:
> Fixnums, Symbols, true, false, and nil get assigned directly to
> variables.  For other objects, variables get a reference to the
> object.  References, like variables, are not themselves objects.
> They're part of a kind of language substratum on which the object
> system floats.

True, but ...

> [...] In fact, in a sense there's even
> less to it, since Ruby handles any necessary de-referencing for you,
> so you don't have to make any explicit distinction in your code.

I think that this second statement is much more important than the 
first.  The fact that 1073741823 is direct and 1073741824 is a reference 
makes very little difference 99.99% of the time.

Understanding that Fixnums, Symbols and the such are direct is good for 
groking implementation details, but provides little insight in using 
Ruby.  The fact we can pretend that everything is a reference is a 
marvelous feature of the Ruby object model.

Just MHO.

--
-- Jim Weirich

-- 
Posted via http://www.ruby-forum.com/.