From: "David A. Black" Date: 2008-04-29T20:03:26+09:00 Subject: Re: Mixins Hi -- On Tue, 29 Apr 2008, Sandro Paganotti wrote: > I don't know if I get the point but this seems work: > > module Mod > @anyvar = 10 > > def func > puts @anyvar > end > end You've got two variables called @anyvar in that code, and they have no relation to each other. The first one is an instance variable belonging to the module Mod (that is, the actual object Mod). The second one represents an instance variable that will belong to each object that executes the func method. So the @anyvar = 10 line is serving no purpose. David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!