diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-23 23:37:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-23 23:37:14 +0000 |
commit | 5d6440c74847135962d87323bbdc71fe342c4c51 (patch) | |
tree | b9be1d6ebb2bc3bdea7d47796b6af13b84235801 /test | |
parent | 5ee251bdad423b244b7127e609a0bf2fec81e7a3 (diff) | |
download | ruby-5d6440c74847135962d87323bbdc71fe342c4c51.tar.gz |
* class.c (rb_class_new): move class check to rb_check_inheritable().
* class.c (rb_check_inheritable): should not allow subclass of
class Class. [ruby-core:26225]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_class.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 8fe1272314..a1f087ad63 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -170,8 +170,7 @@ class TestClass < Test::Unit::TestCase o = Object.new c = class << o; self; end assert_raise(TypeError) { Class.new(c) } - - assert_nothing_raised { Class.new(Class) } # is it OK? + assert_raise(TypeError) { Class.new(Class) } assert_raise(TypeError) { eval("class Foo < Class; end") } end |