From: "Simon Kröger" Date: 2006-05-23T05:44:43+09:00 Subject: Re: initializing instance variables in a module Francis Cianfrocca schrieb: > You still have to call it every time you use the variable. > Do you realy need to use the variable directly? My scripts tend to have very little use of '@'. module Foo def bar(key) @myvar ||= Hash.new {|k,v| k[v] = []} @myvar[key] end end class Test include Foo end t = Test.new t.bar('baz') << 'eeek' p t.bar('baz') I didn't followed the whole thread so please ignore me if this was suggested before. cheers Simon