From: Robert Dober Date: 2007-06-17T01:34:39+09:00 Subject: Ancestors for Singleton classes ------=_Part_67446_24858420.1182011681100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I am taking this away from ruby-talk as it contains patches. By looking at rb_mod_ancestor in class.c one can see that the singleton class is *explicitly not included* into the ancestor list. Therefore this is done for a purpose(1), I'd love to know more about it. As I am curious I just recompiled 1.8.6 with the class.c.patch-incl-ancestor-for-singletons patch, and it did what I wanted at first sight, as I have already done it for fun I have included the patch anyway [a monster patch be warned ;)]. If you do not want this patch, which is very likely, maybe you want the other, even bigger I am afraid;). Cheers Robert (1) Kindly indicated by Rick too. -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw ------=_Part_67446_24858420.1182011681100 Content-Type: application/octet-stream; name=class.c.patch-incl-ancestor-for-singletons Content-Transfer-Encoding: base64 X-Attachment-Id: f_f308h0dx Content-Disposition: attachment; filename="class.c.patch-incl-ancestor-for-singletons" NTA3LDUxNGM1MDcsNTEyCjwgCWlmIChGTF9URVNUKHAsIEZMX1NJTkdMRVRPTikpCjwgCSAgICBj b250aW51ZTsKPCAJaWYgKEJVSUxUSU5fVFlQRShwKSA9PSBUX0lDTEFTUykgewo8IAkgICAgcmJf YXJ5X3B1c2goYXJ5LCBSQkFTSUMocCktPmtsYXNzKTsKPCAJfQo8IAllbHNlIHsKPCAJICAgIHJi X2FyeV9wdXNoKGFyeSwgcCk7CjwgCX0KLS0tCj4gCSAgIGlmIChCVUlMVElOX1RZUEUocCkgPT0g VF9JQ0xBU1MpIHsKPiAJICAgICAgcmJfYXJ5X3B1c2goYXJ5LCBSQkFTSUMocCktPmtsYXNzKTsK PiAJICAgfQo+IAkgICBlbHNlIHsKPiAJICAgICAgIHJiX2FyeV9wdXNoKGFyeSwgcCk7Cj4gCSAg IH0K ------=_Part_67446_24858420.1182011681100 Content-Type: application/octet-stream; name=class.c.patch-chg-doc-ancestor Content-Transfer-Encoding: base64 X-Attachment-Id: f_f308itvq Content-Disposition: attachment; filename="class.c.patch-chg-doc-ancestor" NDg5YzQ4OQo8ICAqICA8aT5tb2Q8L2k+IGl0c2VsZikuCi0tLQo+ICAqICA8aT5tb2Q8L2k+IGl0 c2VsZiB1bmxlc3MgPGk+bW9kPC9pPiBpcyBhIHNpbmdsZXRvbiBjbGFzcykuCg== ------=_Part_67446_24858420.1182011681100--