On Apr 2, 2004, at 3:51 PM, Dan Doel wrote:

> The name of the variable that points to the object isn't an inherent 
> part
> of the object, though.  Like above, you can have any number of 
> variables
> representing the same object.  Also, you could have many objects 
> referencing
> that same object (for example, if it's stored in an array).  Should an 
> object
> also keep references to all objects that reference it?
>
> Variable names are incidental. For example:
>
> def foo
> 	a = String.new
> end
>
> x = foo
>
> When inside the method foo, the string is pointed to by the local 
> variable a.
> However, outside, it's pointed to by the local variable x. What has 
> changed
> about the object? Nothing.
>
> Variables are a lot like pointers in C.  You allocate a pointer to 
> store the
> address of some other memory. It doesn't make sense for every piece of
> memory to also store the addresses of all pointers that point to it.
>
> - Dan

Let me restate the question:

Whenever a method is called on an object, one and only one symbol is 
used to represent the object.  Is there any way to determine which 
symbol was representing the object at the time that the method was 
invoked?

Everything that has been said thus far leads me to believe that the 
answer is no, but nobody has hit the point square on.  I'm anxious to 
clarify my question or provide more information if my question remains 
unclear.  But (as usual -- and this is the reason I rarely use this 
list) people seem more interested in pedantry than genuine assistance.  
Don't get me wrong, the answers are informative and often fill me with 
awe at vast expanses of knowledge possessed by those that offer them.  
They just provide both too much and not enough information at the same 
time, which typically indicates that you're dealing with either an 
obscurantist (e.g., a politician) or a pedant.


-------------------------------------------------------
David King Landrith
   (w) 617.227.4469x213
   (h) 617.696.7133

One useless man is a disgrace, two
are called a law firm, and three or more
become a congress   -- John Adams
-------------------------------------------------------
public key available upon request


-------------------------------------------------------
David King Landrith
   (w) 617.227.4469x213
   (h) 617.696.7133

Life is tough.  It's even tougher if you're
an idiot.  --John Wayne
-------------------------------------------------------
public key available upon request