From: Dave Thomas Date: 2002-09-10T02:04:39+09:00 Subject: Re: scopes Christian Szegedy writes: > Kontra, Gergely wrote: > > Hi! > > I've a question about scopes: > > > @mail=Someclass.new > > > @pass=Someclass.new > > def @pass.check > > # how to acces @mail here? > > end > > > The instance variables are always private in Ruby: > you can't access the instance variables of an object from > a different object. Except in his example above they're the same object. @a = 123 def fred puts @a end fred #=> 123 Cheers Dave