summaryrefslogtreecommitdiff
path: root/tests/json_common_interface_test.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2015-06-15 22:39:32 +0200
committerFlorian Frank <flori@ping.de>2015-06-15 22:47:04 +0200
commit500738e0052eebb306b9e972e2b70065972e45be (patch)
tree874076eda0e85250080c93d101673009c3a390b3 /tests/json_common_interface_test.rb
parent68ce5b6b564f87edd1d4f005a39a230e544d15e8 (diff)
downloadjson-500738e0052eebb306b9e972e2b70065972e45be.tar.gz
Disallow usage of symbolize_names and create_additions
Diffstat (limited to 'tests/json_common_interface_test.rb')
-rw-r--r--tests/json_common_interface_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/json_common_interface_test.rb b/tests/json_common_interface_test.rb
index 1fca19d..9aae2c6 100644
--- a/tests/json_common_interface_test.rb
+++ b/tests/json_common_interface_test.rb
@@ -67,10 +67,8 @@ class JSONParserTest < Test::Unit::TestCase
end
def test_load_with_options
- small_hash = JSON("foo" => 'bar')
- symbol_hash = { :foo => 'bar' }
- assert_equal symbol_hash,
- JSON.load(small_hash, nil, :symbolize_names => true)
+ json = '{ "foo": NaN }'
+ assert JSON.load(json, nil, :allow_nan => true)['foo'].nan?
end
def test_dump