diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-11 15:36:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-11 15:36:52 +0000 |
commit | b4114b4dc783fb53812334136cc4c3890715c6c3 (patch) | |
tree | 5ad45c9601b009047cfe815c7e63dbdd0e6e31da /object.c | |
parent | 54198fca16edef9ec2828edad7b9dd82693d19c8 (diff) |
* 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
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1587,6 +1587,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; } |