From: ara.t.howard@... Date: 2006-11-08T13:50:40+09:00 Subject: Re: Can't bind a singleton method to a subclass? On Wed, 8 Nov 2006 dblack@wobblini.net wrote: >> yes. put another way, and something i was be-moaning several years ago, is >> this: >> >> harp:~ > cat a.rb >> class A >> SINGLETON_CLASS = class << self >> self >> end >> end >> class B < A >> SINGLETON_CLASS = class << self >> self >> end >> end >> >> p B::SINGLETON_CLASS.ancestors >> >> harp:~ > ruby a.rb >> [Class, Module, Object, Kernel] >> >> singleton classes should respect inheritence. > > I'm not sure what you mean here. Is it that ancestors doesn't show > singleton classes? i meant that B's singleton class should inherit from A's singleton class - the fact that it does not leads to all sorts of suprising behaviour... -a -- my religion is very simple. my religion is kindness. -- the dalai lama