Peña, Botp wrote:
> From: Robert Dober [mailto:robert.dober / gmail.com]
> # p C2.ancestors - (Class.new.ancestors + [C2])
> 

Hi

Thanks for the reply. I have looked all the solution but all above 
solution also includes modules which are included indirectly. I wants 
list of modules which are included directly. See below example.

E.g.
----
module IN
end

module M1
  include IN
end

module M2
  include IN
end

class C
  include M1
  include M2
  ...
end
----
     If we try above solution then I will get M1, M2, IN and Kernel. But 
I want list which contains M1 and M2 only because these both are 
included directly in class C.

Regards
Chirag
-- 
Posted via http://www.ruby-forum.com/.