From: Edwin van Leeuwen Date: 2005-11-27T21:39:57+09:00 Subject: Re: How do two objects communicate? anne wrote: > Am I getting this right? Partly, most objects communicate only with objects they create and the object that created them. class A def initialize arr=[1,2,3,4] arr.last end def ask return arr.first end end a=A.new last=a.ask Here the object we are currently in creates a object a of class A, it communicates with this object with a.ask. The object a itself creates an Object arr and also communicates with that. This is the way most object communicate with each other. If you need two object (A and B) that are created by a third object (C) to communicate with each other then you are probably doing something wrong (although not always) and it might have been better if Object A had created object B instead of letting Object C create both. Hope that clears some things up :) Edwin -- Posted via http://www.ruby-forum.com/.