summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-16 10:15:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-16 10:15:28 +0000
commit9528358120511f0587be39c853f5916cf8d05a9d (patch)
tree3b626a2aab86b68d1af92ec27352b1068dcb4a7f /test/ruby
parenta39b94d3022e37f4a5c3ce7cd112ac01f6e2ceec (diff)
object.c: forbid uninitialized class
* object.c (rb_class_initialize): forbid inheriting uninitialized class. another class tree not based on BasicObject cannot exist. [ruby-core:47148][Bug #6863] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_class.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 12f78ddabc..88fe79bb11 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -203,6 +203,8 @@ class TestClass < Test::Unit::TestCase
def test_uninitialized
assert_raise(TypeError) { Class.allocate.new }
assert_raise(TypeError) { Class.allocate.superclass }
+ bug6863 = '[ruby-core:47148]'
+ assert_raise(TypeError, bug6863) { Class.new(Class.allocate) }
end
def test_nonascii_name