Skip to content
Browse files

Merge pull request #857 from kachick/class-initialize-reject-class

Reject `Class` for superclass of Class#initialize
  • Loading branch information
alex committed Oct 24, 2015
2 parents 4eda63c + 0f31476 commit 04d3bcc24a4521197d2e2cc0386e89aa87567ace
Showing with 4 additions and 1 deletion.
  1. +0 −1 spec/tags/core/class/initialize_tags.txt
  2. +4 −0 topaz/objects/

This file was deleted.

@@ -143,6 +143,10 @@ def method_initialize(self, space, w_superclass=None, block=None):
raise space.error(space.w_TypeError,
"superclass must be a Class (%s given)" % space.obj_to_s(space.getclass(w_superclass))
if w_superclass is space.w_class:
raise space.error(space.w_TypeError,
"can't make subclass of Class"
if w_superclass.is_singleton:
raise space.error(space.w_TypeError,
"can't make subclass of singleton class"

0 comments on commit 04d3bcc

Please sign in to comment.
You can’t perform that action at this time.