summary refs log tree commit
path: root/tests/test_json_generate.rb
DateCommit message (Collapse)
2011-08-09json/generator: enforce Strings for fbuffer_append_str HEAD master
"to_s" is not guaranteed to return a string and calling RSTRING_ macros on them blindly can cause bus errors/segfaults. Found by nobu: [ruby-core:38867]
2011-08-09ext/json/generator/generator.c: prevent GC of temporary strings
We need to guard temporary strings from being collected while we append to the JSON buffer (which may allocate memory). The RSTRING_PAIR macro is dangerous since it preserves no pointer to the original string VALUE, allowing GC to reap the object while we're still using the (C) string pointer. The included test case shows data corruption with large Bignums without this fix.
2011-05-12Skip test which fails on some platforms
2011-02-26flori/json#60: Incorrect pretty-print indentation
2011-01-02fixed test setup
2010-09-23started to build jruby extension with Rakefile
2010-08-18keep track of depth correctly
2010-08-07do not forget to dup the state
use state for depth checking in pure as well
2010-08-07added missing methods to State + tests
2010-03-13Merge commit 'v1.2.3'
Merged in some additional features from the v1.2 branch.
2010-03-11added [] method to State objects
2009-11-20check circular is deprecated
2009-10-26start to use a faster string buffer
2009-10-16added additional checks for generate methods
2009-10-16different default in fast_generate
fast_generate now defaults to throwing an exception if an infinite or nan float is encountered. This is the same behaviour as in generate and pretty_generate. (Fix for http://github.com/flori/json/issues#issue/3)
2009-08-24initial commit