diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-21 08:29:06 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-21 08:29:06 +0000 |
| commit | 35a47376696db6a84cb2c5c707a370120165bc00 (patch) | |
| tree | 8a5568fbc4fe82c986a8c65f0cee8d5ae39c9817 /eval.c | |
| parent | e22db0e50db0ff719be1f4caf6a1df9da6d11398 (diff) | |
| download | ruby-35a47376696db6a84cb2c5c707a370120165bc00.tar.gz ruby-35a47376696db6a84cb2c5c707a370120165bc00.tar.xz ruby-35a47376696db6a84cb2c5c707a370120165bc00.zip | |
* class.c (rb_check_inheritable): new function. [ruby-dev:22316]
* intern.h: add prototype.
* eval.c (superclass): use rb_check_inheritable().
* object.c (rb_class_initialize): check argument validity.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -1699,13 +1699,7 @@ superclass(self, node) } JUMP_TAG(state); } - if (TYPE(val) != T_CLASS) { - rb_raise(rb_eTypeError, "superclass must be a Class (%s given)", - rb_obj_classname(val)); - } - if (FL_TEST(val, FL_SINGLETON)) { - rb_raise(rb_eTypeError, "can't make subclass of virtual class"); - } + rb_check_inheritable(val); return val; } |
