"MikkelFJ" <mikkelfj-anti-spam / bigfoot.com> wrote in message news:3d5d07d8$0$33591$edfadb0f / dspool01.news.tele.dk... > Thanks for the clarification. > > > The term "static" is misleading. Static (as used in Java and C++) > > refers to stand-alone functions that are in the scope of a class, but > > can be invoked without any reference to an object instance. No such > > thing exists in Ruby. > > This isn't exactly true. The C++ class can have static data members. If you > like, you can call these part of the static object instance. You can call > the functions without a reference to an instance because the compiler > implicitly knows the location of the static instance, still you give the > name of class, just as you do in Ruby. When I use the term static it relates > to the statically allocated nature (or preallocated globally known nature). What about anonymous classes ? They sort of make your argument mood IMHO. --- anon = Class.new class A; end anon.class_eval { @my_name = "anon" def inst_meth puts "an inst" end Const = "anon's_const" def A.const puts Const end } class << anon def my_name puts @my_name end end anon.new.inst_meth # an_inst anon.my_name # anon A.const # anon's_const --- /Christoph