On Behalf Of Chirag Mistry:
# only want a list which contains modules M1 and M2 for MyClass. If we
# call ¡ÈMyClass.ancestors¡É which returns all the modules which
# are include directly or indirectly in this class and all parent class
how about subtracting fr there =)
something like,
irb(main):026:0> C2.ancestors - (Class.new.ancestors + [C2])
=> [M2, M1]
sorry if my answer sound stupid.
kind regards -botp