banister / object2module

Convert Classes and Objects to Modules so they can be extended/included.
MIT License
9 stars 0 forks source link

gen_include doesn't respect current superclass #3

Closed jeremyevans closed 4 years ago

jeremyevans commented 13 years ago

class A; def self.a() [1] end end class B < A; def self.a() [2] + super() end end class C < B; def self.a() [3] + super() end end class D < A; def self.a() [4] + super() end; gen_include C end p D.ancestors => [D, C, B, A, A, Object, Object2module::ObjectExtensions, Kernel]

A should not appear multiple times in the super chain.