summary refs log tree commit
path: root/tests/test_json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_json.rb')
-rwxr-xr-xtests/test_json.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_json.rb b/tests/test_json.rb
index 4fc6a28..d320498 100755
--- a/tests/test_json.rb
+++ b/tests/test_json.rb
@@ -406,4 +406,11 @@ EOT
     json5 = JSON([orig = 1 << 64])
     assert_equal orig, JSON[json5][0]
   end
+
+  if defined?(JSON::Ext::Parser)
+    def test_uninitialized
+      parser = JSON::Ext::Parser.allocate
+      assert_raise(TypeError) {parser.source}
+    end
+  end
 end