On Thursday, January 23, 2003, 3:57:28 AM, Mauricio wrote:

>> The logic above appears to apply, but
>> 
>>   A.include M
>> 
>> fails because "private method `include' called for A:Class".

> You do probably already know it, but for the record, we have
>         Object#extend (public)
>         Module#include (private)

> The question is why are Module#include and Module#append_features
> private?


Well, here's some cool code then:

   >> module M; def hi; "hi"; end; end
   => nil
   
   >> class A; end
   => nil
   
   >> A.include M
   NameError: private method `include' called for A:Class
           from (irb):3

   >> class Module
   >>   def inc(*args)
   >>     include *args
   >>   end
   >> end
   => nil
   
   >> A.inc M
   => A
   
   >> A.new.hi
   => "hi"

Gavin (who's trying to get his Ruby-English ratio up...)