diff options
author | Florian Frank <flori@ping.de> | 2015-01-02 23:55:20 +0100 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2015-01-02 23:55:20 +0100 |
commit | 9b4302c7d59cc83e9b4733da9da26df569e0d278 (patch) | |
tree | 09cf604c6e7df08c956f850aecb1093986cd08fa /tests | |
parent | 05ba45c2d46c8ff4807613b60b204f85a7720997 (diff) | |
parent | 737bb637c7accfb1a704bc15560ab8bb83fccfa4 (diff) | |
download | json-9b4302c7d59cc83e9b4733da9da26df569e0d278.tar.gz |
Merge branch 'master' into zzak-ruby-2.2
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_json.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_json.rb b/tests/test_json.rb index 462650e..7957773 100755 --- a/tests/test_json.rb +++ b/tests/test_json.rb @@ -517,6 +517,12 @@ EOT assert_equal too_deep, output.string end + def test_dump_should_modify_defaults + max_nesting = JSON.dump_default_options[:max_nesting] + JSON.dump([], StringIO.new, 10) + assert_equal max_nesting, JSON.dump_default_options[:max_nesting] + end + def test_big_integers json1 = JSON([orig = (1 << 31) - 1]) assert_equal orig, JSON[json1][0] |