aboutsummaryrefslogtreecommitdiffstats
path: root/ext/json
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies.akr2016-04-112-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* handle ext/ as r53141naruse2015-12-1621-0/+21
| | | | | | | | g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/json.gemspec: bump version to json 1.8.3. CRuby already containedhsbt2015-12-052-2/+2
| | | | | | | | | upstream changes. https://github.com/ruby/ruby/commit/4d059bf9f5f10f3d3088de49fc87e5555db7770d https://github.com/flori/json/commit/d4c99de78905d96c3f301f48b2c789943bb3f098 * ext/json/lib/json/version.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.c: updatenobu2015-09-251-18/+26
| | | | | | * ext/json/parser/parser.c: update to r51946. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: rb_scan_argsnobu2015-09-251-1/+9
| | | | | | | * ext/json/parser/parser.rl (cParser_initialize): use ':' in rb_scan_args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generator.c: allocate structs with wrappernobu2015-05-282-11/+5
| | | | | | | | * ext/json/generator/generator.c (cState_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: allocate structs with wrappernobu2015-05-283-23/+10
| | | | | | | | * ext/json/parser/parser.rl (cJSON_parser_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: define enc_raise iff necessarynobu2015-04-182-4/+4
| | | | | | | * ext/json/parser/parser.rl (enc_raise): no needs if rb_enc_raise is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: rb_enc_raisenobu2015-04-183-93/+134
| | | | | | | * ext/json/parser/parser.rl: raise with messages in UTF-8 encoding. [ruby-core:67386] [Bug #10705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: use rb_encodingnobu2015-04-182-124/+119
| | | | | | | * ext/json/parser/parser.rl (convert_encoding): use rb_encoding functions to compare and convert encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: use StringValuenobu2015-04-182-23/+21
| | | | | | | | * ext/json/parser/parser.rl (cParser_initialize): use StringValue instead of direct rb_convert_type and remove duplicate conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/json.gemspec: bump version to 1.8.2.hsbt2015-04-122-2/+2
| | | | | | * ext/json/lib/json/version.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.hsbt2015-04-121-0/+7
| | | | | | | * defs/default_gems, tool/rbinstall.rb: removed default_gems definition. it make simple installation for default gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/*, test/json/*: Reverted r50231. Because it's not works withhsbt2015-04-1230-0/+6170
| | | | | | cross-compile environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.hsbt2015-04-1130-6170/+0
| | | | | | | | | | | [fix GH-867][Feature #11057] * test/ruby/test_extlibs.rb: removed json gem from existence extentions. * gems/bundled_gems: added json gem into bundled gem. * lib/rdoc/rubygems_hook.rb: ignored no json environment. * lib/rubygems/test_case.rb, test/rubygems/*: ditto. * lib/rdoc/test_case.rb, test/rdoc/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json: merge upstream from flori/jsonhsbt2015-02-135-35/+18
| | | | | | change usage of TypedData. [Feature #10739][ruby-core:67564] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generator.c: fix infinite recursionnobu2015-02-111-1/+1
| | | | | | | | * ext/json/generator/generator.c (generate_json): get rid of unnecessary recursive calls which can cause infinite recursion. T_STRING may not have rb_cString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json, test/json: merge JSON HEAD(259dee6)hsbt2015-01-132-1/+2
| | | | | | | separate imprementation of Typed_Data macro. https://github.com/flori/json/compare/v1.8.1...v1.8.2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_object.rb: useless methodsnobu2015-01-061-8/+0
| | | | | | | * ext/json/lib/json/generic_object.rb (JSON::GenericObject): remove useless overriding methods, [] and []=. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2014-12-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json, test/json: merge JSON HEAD(17fe8e7)hsbt2014-12-288-20/+31
| | | | | | https://github.com/flori/json/compare/v1.8.1...17fe8e7 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/json: for ancient backward compatibilitiesnobu2014-12-285-0/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generator.h: use GET_STATE_TOnobu2014-12-281-1/+1
| | | | | | | * ext/json/generator/generator.h (GENERATE_JSON): use GET_STATE_TO macro, instead of TypedData_Get_Struct directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json: backward compatibilitiesnobu2014-12-275-4/+28
| | | | | | | | | | * ext/json/generator/generator.c (JSON_Generator_State_type): add #ifdef for backward compatibility. * ext/json/parser/parser.rl (JSON_Parser_type): ditto. * ext/json/generator/generator.h (ZALLOC): add fallback definition. * ext/json/parser/parser.h (ZALLOC): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: check before usenobu2014-12-262-9/+9
| | | | | | | | * ext/json/parser/parser.rl (unescape_unicode): check if valid before bit-or assignments. reported by Denis Denisov <denji0k AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies.akr2014-12-192-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use 0 for reservednobu2014-12-013-3/+3
| | | | | | | use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependency.akr2014-11-212-1/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mark auogenerated part.akr2014-11-152-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: Remove comments in Dependency lines.akr2014-11-152-7/+7
| | | | | | | | | | | | Notified by usa. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/update-deps: Extend to fix dependencies.akr2014-11-152-0/+7
| | | | | | | | | | | | * common.mk: Dependencies updated by tool/update-deps. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/parser: typed datanobu2014-10-043-10/+41
| | | | | | | * ext/json/parser/parser.rl (JSON_Parser_type): turn into typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/generator: typed datanobu2014-10-042-9/+35
| | | | | | | * ext/json/generator/generator.c (JSON_Generator_State_type): turn into typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: protoize no-arguments functionsnobu2014-10-042-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: protoize no-arguments functionsnobu2014-10-042-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fbuffer.h: expand argumentsnobu2014-09-181-1/+1
| | | | | | | * ext/json/fbuffer/fbuffer.h (fbuffer_to_s): expand arguments, for fix with rb_str_new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/parser/prereq.mk: use enumnobu2014-03-172-33/+34
| | | | | | | * ext/json/parser/prereq.mk (parser.c): use `enum` instead of `static const int` to get rid of unused-const-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: do nothing if copying selfnobu2014-02-211-0/+1
| | | | | | | | * class.c (rb_mod_init_copy): do nothing if copying self. [ruby-dev:47989] [Bug #9535] * hash.c (rb_hash_initialize_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/json: backward compatibilitiesnobu2014-01-152-2/+11
| | | | | | | * ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c: add macros for backward compatibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/json: objects depend on $(ruby_headers)tmm12014-01-072-0/+2
| | | | | | | | * ext/json/generator/depend: add build dependencies for json extension Patch by normalperson (Eric Wong) [Bug #9374] [ruby-core:59609] * ext/json/parser/depend: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/notifier.rb: [Doc] Fix typoa_matsuda2013-11-271-1/+1
| | | | | | * ext/json/lib/json/common.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json: merge JSON 1.8.1.naruse2013-11-208-31/+38
| | | | | | | | | | | | | | | | https://github.com/nurse/json/compare/002ac2771ce32776b32ccd2d06e5604de6c36dcd...e09ffc0d7da25d0393873936c118c188c78dbac3 * Remove Rubinius exception since transcoding should be working now. * Fix https://github.com/flori/json/issues/162 reported by Marc-Andre Lafortune <github_rocks@marc-andre.ca>. Thanks! * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress warning with -Wchar-subscripts and better validate UTF-8 strings. * Applied patch by ginriki@github to remove unnecessary if. * Add load/dump interface to JSON::GenericObject to make serialize :some_attribute, JSON::GenericObject work in Rails active models for convenient SomeModel#some_attribute.foo.bar access to serialised JSON data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Eliminate less-than-zero checks for unsigned variablesnobu2013-09-122-2/+2
| | | | | | | | | | | * ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c, ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c: Eliminate less-than-zero checks for unsigned variables. According to section 4.1.5 of C89 standard, size_t is an unsigned type. These checks were found with 'cppcheck' static analysis tool. [ruby-core:57117] [Feature #8890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/add/range.rb: use Range#endnobu2013-08-061-1/+1
| | | | | | | | * ext/json/lib/json/add/range.rb (Range#as_json): use Range#end instead of Range#last which can be affected by Range#exclusive?. ref [Bug #8739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup stying of `Json#generate` parameter docs by @daveworth [fixes GH-339]hsbt2013-07-091-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place ofnaruse2013-06-071-2/+2
| | | | | | RB_GC_GUARD. it should be after the object is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/generator/generator.c (isArrayOrObject): cast char tonaruse2013-05-081-2/+2
| | | | | | unsigned char. [Bug #8378] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/generator/depend: fix dependencies [Bug #8379]naruse2013-05-082-2/+8
| | | | | | * ext/json/parser/depend: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]zzak2013-04-161-5/+5
| | | | | | | | | | | | | | | * ext/stringio/stringio.c: ditto * ext/io/wait/wait.c: ditto * ext/gdbm/gdbm.c: ditto * ext/dl/cfunc.c: ditto * ext/zlib/zlib.c: ditto * ext/win32ole/win32ole.c: ditto * ext/dbm/dbm.c: ditto * ext/json/generator/generator.c: ditto * ext/date/date_core.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json: merge JSON 1.7.7.naruse2013-02-129-39/+112
| | | | | | | | This includes security fix. [CVE-2013-0269] https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2 https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e