diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2011-07-07 23:20:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2011-07-08 06:56:59 +0900 |
commit | d1c383904523a6e017e3ea9a919aeb0d611218e7 (patch) | |
tree | ec687d8ae56d70607e45620d8252d55a2da00cac | |
parent | 8abe6f4141127f019f6346f81baa778cbab15224 (diff) | |
download | json-d1c383904523a6e017e3ea9a919aeb0d611218e7.tar.gz |
re-initialize test
* tests/test_json.rb (test_allocate): add re-initialize test.
-rwxr-xr-x | tests/test_json.rb | 6 |
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 |