summaryrefslogtreecommitdiff
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-02 12:57:18 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-02 12:57:18 +0000
commite58dc6a96818c17dd32b3929fc0d9ad2b3a2bbd9 (patch)
tree39c26b282f76ebbaa2536458e28c451adad64ffc /test/ruby/test_class.rb
parent7eb625425c3acb33ea712bc36bbe17302cfbca94 (diff)
* test/ruby/test_file.rb: add tests for uninitialized object.
* test/ruby/test_class.rb: ditto. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 8c035b5d59..b45c70ae5e 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -146,4 +146,9 @@ class TestClass < Test::Unit::TestCase
assert_equal(":foo\n:foo\ntrue\ntrue", r.read.chomp)
end
end
+
+ def test_uninitialized
+ assert_raise(TypeError) { Class.allocate.new }
+ assert_raise(TypeError) { Class.allocate.superclass }
+ end
end