diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | object.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Jan 12 00:36:29 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * object.c (rb_class_superclass): superclass of singleton class also + should be a singleton class. fixed: [ruby-list:40519] + Tue Jan 11 09:44:40 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * numeric.c (Init_Numeric): turn off floating point exceptions @@ -1624,6 +1624,9 @@ rb_class_superclass(klass) if (!super) { rb_raise(rb_eTypeError, "uninitialized class"); } + if (FL_TEST(klass, FL_SINGLETON)) { + super = RBASIC(klass)->klass; + } while (TYPE(super) == T_ICLASS) { super = RCLASS(super)->super; } |