summary refs log tree commit
path: root/tests
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-07-08remove trailing spaces.
2011-07-08should not modify argument
* ext/json/ext/parser/parser.h (FORCE_UTF8): should not modify encoding of the argument.
2011-07-08re-initialize test
* tests/test_json.rb (test_allocate): add re-initialize test.
2011-07-07* ext/json/ext/parser/parser.h (GET_PARSER): raise TypeError.
* ext/json/ext/parser/parser.rl (cParser_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-12Skip test which fails on some platforms
2011-05-12Fix duplicate test
2011-05-12Don't optimize calls for ducktypes
2011-05-11Merge pull request #63 from vakuum/issue-60
flori/json#60: Incorrect pretty-print indentation
2011-04-01If a custom :object_class is given, the C extension should not use ↵
rb_hash_aset - it should call the object's []= method instead.
2011-02-26flori/json#60: Incorrect pretty-print indentation
2011-01-05renamed :match argument to :match_string
2011-01-02Rubinius' strscan already has a @match ivar
2011-01-02fixed test setup
2011-01-02Added matching in pure/ext parser
2011-01-02obsoleted json/add/rails definitions
2011-01-02use JSON.iconv abstraction
2011-01-02never use iconv
2010-09-23started to build jruby extension with Rakefile
2010-08-18prepare new version
fixed some warnings wrote some rake tasks to build jruby extension
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-08-05Revert "use method dispatch for generation again"
This reverts commit 59eab2b7ad1b44dc424fb3fffa5520947f7360f3. Conflicts: ext/json/ext/generator/generator.c
2010-08-05Revert "use method dispatch for generation again"
This reverts commit f0a14faf1d59a5ea86a79d3a5780e8433bfc9e16.
2010-08-03use method dispatch for generation again
2010-05-05Merge branch 'master' of github.com:/flori/json
2010-05-05Fix for subclassed core classes, github issue 20
Fixed a problem in the 1.4.x versions, that caused subclasses of core classes to miss calling their to_json methods.
2010-05-03Fix wrong assertion: use assert_equal.
From Ruby r27587 and r27590, by nobu.
2010-04-25Fixed T_FIXNUM bug on 64bit architectures.
2010-03-13Merge commit 'v1.2.3'
Merged in some additional features from the v1.2 branch.
2010-03-11added [] method to State objects
2010-02-27Improved some tests
First stab at Rubinius compatibility
2010-02-27Compatibility to Rubinius
Bumped the version number to 1.2.2 and fixed some tests, too.
2009-11-25implemented symbolize_names feature, #8
2009-11-20check circular is deprecated
2009-10-26optimised speed a lot, added only_ascii mode
2009-10-26start to use a faster string buffer
2009-10-26use Array#permutation if it exists
otherwise create a Array#permutation method with the permutation gem on the fly
2009-10-19added conversion to utf8 to generators as well
2009-10-16implemented utf sniffing, transcoding in parser
improved documentation added to changes
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