>>>>> "D" == David Garamond <davegaramond / icqmail.com> writes:

D> thanks. so as i see it, 'extend' is like 'include' but operates at the 
D> object level (while 'include' usually works at the class level), right? 

 Well, it's perhaps best if you see that #extend work at singleton level

 For example

   class A
      extend M
   end

 is *like* if you write

   class A
      class << self
         include M
      end
   end

  a = A.new.extend(M)

  is *like*

  class << a
     include M
  end


D> btw, does 'extend' have a significant runtime cost?

 no, why ?


Guy Decoux