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 | 8d239337eee9c0dad5eb6a3d8631eae35835bf5f (patch) | |
| tree | 5ad45c9601b009047cfe815c7e63dbdd0e6e31da | |
| parent | 7dae5b90d4f428add1e71cd0c24ea75b9dbab031 (diff) | |
| download | ruby-8d239337eee9c0dad5eb6a3d8631eae35835bf5f.tar.gz ruby-8d239337eee9c0dad5eb6a3d8631eae35835bf5f.tar.xz ruby-8d239337eee9c0dad5eb6a3d8631eae35835bf5f.zip | |
* object.c (rb_class_superclass): superclass of singleton class also
should be a singleton class. fixed: [ruby-list:40519]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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 20:58:52 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * io.c (remain_size): use buffered data instead of unreading to avoid @@ -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; } |
