1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* object.c (rb_class_superclass): superclass of singleton class also

should be a singleton class.  fixed: [ruby-list:40519]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-01-11 15:36:52 +00:00
parent 54198fca16
commit b4114b4dc7
2 changed files with 8 additions and 0 deletions

View file

@ -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 20:58:52 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> Tue Jan 11 20:58:52 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (remain_size): use buffered data instead of unreading to avoid * io.c (remain_size): use buffered data instead of unreading to avoid

View file

@ -1587,6 +1587,9 @@ rb_class_superclass(klass)
if (!super) { if (!super) {
rb_raise(rb_eTypeError, "uninitialized class"); rb_raise(rb_eTypeError, "uninitialized class");
} }
if (FL_TEST(klass, FL_SINGLETON)) {
super = RBASIC(klass)->klass;
}
while (TYPE(super) == T_ICLASS) { while (TYPE(super) == T_ICLASS) {
super = RCLASS(super)->super; super = RCLASS(super)->super;
} }