From: TRANS Date: 2005-10-11T06:01:57+09:00 Subject: Re: extend and super -- I cannot understand why this behavior On 10/10/05, Mathieu Bouchard wrote: > On Tue, 11 Oct 2005, TRANS wrote: > > > module Q > > module H > > def x ; @x ||= [] ; end > > end > > extend H > > end > > class R > > extend Q::H > > def self.x ; @x ||= [] ; super + @x ; end > > def self.x! ; @x ||= [] ; end > > end > > > R.x! << 2 > > => [2] > > R.x > > => [2, 2] # huh? > > class< > classes are objects like everything else. Calling super causes a > supermethod to be called in class<