diff options
Diffstat (limited to 'test/ruby/test_class.rb')
| -rw-r--r-- | test/ruby/test_class.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 8c035b5d5..b45c70ae5 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 |
