From fa563e8f1665fe5f54d26ce4321ce9bd4786c1c3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 7 Jul 2011 23:20:33 +0900 Subject: re-initialize test * tests/test_json.rb (test_allocate): add re-initialize test. --- tests/test_json.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_json.rb b/tests/test_json.rb index d320498..5b43ec9 100755 --- a/tests/test_json.rb +++ b/tests/test_json.rb @@ -408,9 +408,11 @@ EOT end if defined?(JSON::Ext::Parser) - def test_uninitialized + def test_allocate + parser = JSON::Ext::Parser.new("{}") + assert_raise(TypeError, '[ruby-core:35079]') {parser.__send__(:initialize, "{}")} parser = JSON::Ext::Parser.allocate - assert_raise(TypeError) {parser.source} + assert_raise(TypeError, '[ruby-core:35079]') {parser.source} end end end -- cgit v1.2.3-24-ge0c7