summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2011-07-07 23:20:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2011-07-08 06:56:59 +0900
commitd1c383904523a6e017e3ea9a919aeb0d611218e7 (patch)
treeec687d8ae56d70607e45620d8252d55a2da00cac /tests
parent8abe6f4141127f019f6346f81baa778cbab15224 (diff)
downloadjson-d1c383904523a6e017e3ea9a919aeb0d611218e7.tar.gz
re-initialize test
* tests/test_json.rb (test_allocate): add re-initialize test.
Diffstat (limited to 'tests')
-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