From: Kent Dahl Date: 2002-01-21T00:34:10+09:00 Subject: Re: Mixin question Markus Jais wrote: > class Cla > class << self > include Mod > end > end > > and > > class Cla > extend Mod > end No difference, as you've noticed, except the latter looks better IMHO. Jumping around eval.c (for 1.6.5), you'll notice that the extend call eventually lands at this code: void rb_extend_object(obj, module) VALUE obj, module; { rb_include_module(rb_singleton_class(obj), module); } .... which basically translates into what you do in the first version, but in C. -- <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> )____(stud.techn.;ind.�k.data)||(softwareDeveloper.at(Trustix))_( /"Opinions expressed are mine and not those of my Employer, "\ ( "the University, my girlfriend, stray cats, banana fruitflies, " ) \"nor the frontal lobe of my left cerebral hemisphere. "/