From: Jeremy Tregunna Date: 2006-09-04T12:59:04+09:00 Subject: Re: Does an instance know his own name? On 06-09-03, at 23:10, Geoff Barnes wrote: > If a class has built checks and raises an exception if it finds > something wrong, how can I tell which instance had the error? I know > there's an object_id, but can I know the name of the objects own > instance variable? Instances don't have names. > huey = Nephew.new > duey = Nephew.new > luey = Nephew.new These are examples of binding an instance to a particular key (think of it in terms of a dictionary/hashtable), and not naming the instances of Nephew: huey, duey and luey. -- Jeremy Tregunna jtregunna@blurgle.ca