From: "Nakada, Nobuyoshi" Date: 2005-05-16T14:37:03+09:00 Subject: Re: Bug printing classes - Re: infinite number of singleton_classes Hi, David A. Black wrote: > I'd rather just see the #inspect bug fixed :-) I rather guess singleton class would not be allowed to copy, from its definition. Index: class.c =================================================================== RCS file: /cvs/ruby/src/ruby/class.c,v retrieving revision 1.89 diff -U2 -p -r1.89 class.c --- class.c 4 Mar 2005 06:47:45 -0000 1.89 +++ class.c 16 May 2005 05:35:05 -0000 @@ -106,4 +106,7 @@ rb_class_init_copy(clone, orig) rb_raise(rb_eTypeError, "already initialized class"); } + if (FL_TEST(orig, FL_SINGLETON)) { + rb_raise(rb_eTypeError, "can't copy singleton class"); + } return rb_mod_init_copy(clone, orig); } -- Nobu Nakada