summary refs log tree commit
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2011-07-07 23:20:33 +0900
committerFlorian Frank <flori@ping.de>2011-07-08 01:24:51 +0200
commitfa563e8f1665fe5f54d26ce4321ce9bd4786c1c3 (patch)
treeec687d8ae56d70607e45620d8252d55a2da00cac
parent2a74207636bf0fd8a74b7ae58cf5631da3c28638 (diff)
downloadruby-json-fa563e8f1665fe5f54d26ce4321ce9bd4786c1c3.tar.gz
re-initialize test
* tests/test_json.rb (test_allocate): add re-initialize test.
-rwxr-xr-xtests/test_json.rb6
1 files 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