/*! * Creates a new class. * \param super a class from which the new class derives. * \exception TypeError \a super is not inheritable. * \exception TypeError \a super is the Class class. */ VALUE rb_class_new(VALUE super) { Check_Type(super, T_CLASS); rb_check_inheritable(super); return rb_class_boot(super); }
/*! * Creates a new class. * \param super a class from which the new class derives. * \exception TypeError \a super is not inheritable. * \exception TypeError \a super is the Class class. */ VALUE rb_class_new(VALUE super) { Check_Type(super, T_CLASS); rb_check_inheritable(super); if (super == rb_cClass) { rb_raise(rb_eTypeError, "can't make subclass of Class"); } return rb_class_boot(super); }