7stud -- wrote:
>

Because you mentioned C++, I'll just point out that "ruby references" 
are not like C++ reference types.  In C++, a reference variable is an 
alias for another variable, which means that both variables refer to the 
same location in memory.  If you use one of the variable names to change 
what is at that location in memory, the other variable, because it 
retrieves its value from the same location in memory, also refers to the 
changed value.

In my ruby example above, x and y are not aliases--even though they 
refer to the same object 10.  As a result, when y is assigned a new 
value, it does not affect x.

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