summaryrefslogtreecommitdiff
path: root/ext/json/lib/json
AgeCommit message (Collapse)Author
2020-09-25[flori/json] Fix JSON.load_file docJean Boussier
https://github.com/flori/json/commit/cb61a00ba8 Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Partial compliance with doc/method_documentation.rdocBurdetteLamar
https://github.com/flori/json/commit/6dfa885134 Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Enhanced RDoc for JSON.dump (#443)Burdette Lamar
* Enhanced RDoc for JSON.dump https://github.com/flori/json/commit/03f1699ec4 Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Nodoc for recurse_procBurdetteLamar
https://github.com/flori/json/commit/f8c0fe2408 Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] RDoc for JSON.load with procBurdetteLamar
https://github.com/flori/json/commit/a55c91934e Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] RDoc example for JSON.loadBurdetteLamar
https://github.com/flori/json/commit/e4eead665c Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Enhance RDoc for JSON.parseBurdetteLamar
https://github.com/flori/json/commit/33e64ef255 Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Move options from #generate and #parse to common areaBurdetteLamar
https://github.com/flori/json/commit/20d7be605a Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Add `load_file` and `load_file!` methods, with tests. Fixes ↵Keith Bennett
issue #386. https://github.com/flori/json/commit/0be363c99b Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Add an option to escape forward slash characterJean Boussier
Squashed commit of the following: commit 26d181059989279a79c433cedcd893b4f52e42ee Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Tue Sep 15 21:17:34 2015 +0000 add config options for escape_slash commit fa282334051b16df91ca097dd7304b46f3bc7719 Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Mon Feb 9 21:09:33 2015 +0000 add forward slash to escape character Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-07-01Merge json-2.3.1 from flori/jsonHiroshi SHIBATA
2020-07-01[flori/json] Added :call-seq: to RDOc for some methodsBurdetteLamar
https://github.com/flori/json/commit/ee5b6a74e9
2020-07-01[flori/json] RDoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/ada48f0236
2020-07-01[flori/json] RDoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/470d909c0d
2020-07-01[flori/json] RDoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/7bee2c7c13
2020-07-01[flori/json] Rdoc enhancementsBurdetteLamar
https://github.com/flori/json/commit/e7e3732130
2020-01-06[flori/json] Enchance generic JSON and #generate docszverok
https://github.com/flori/json/commit/4ede0a7d19
2019-12-12Import json-2.3.0 from flori/jsonHiroshi SHIBATA
2019-10-14[flori/json] Pass args all #to_json in json/add/*.Sho Hashimoto
https://github.com/flori/json/commit/36a7ef6790
2019-09-25Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans
Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function. Notes: Merged-By: jeremyevans <code@jeremyevans.net>
2019-02-23Merge json-2.2.0 from flori/json.hsbt
https://github.com/flori/json/releases/tag/v2.2.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16Merge json-2.1.0 from https://github.com/flori/jsonhsbt
https://github.com/flori/json/blob/master/CHANGES.md#2017-04-18-210 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12Merge json-2.0.4.hsbt
* https://github.com/flori/json/releases/tag/v2.0.4 * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Fix rdoc of OpenStruct.json_create [ci skip]nobu
* ext/json/lib/json/add/ostruct.rb (OpenStruct.json_create): Correct documentation, fix the name of values. [Fix GH-1421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-01* ext/json/*, test/json/json_parser_test.rb: Update json-2.0.2.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14json/ext: remove stale directorynobu
* ext/json/lib/json/ext: remove stale directory. bundled extension libraries are placed under the directory for each architectures, but not mixed with plain text script libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14* ext/json/**/*.rb: merge original files from upstream repository.hsbt
It only fixes styles of frozen string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-05* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-05* ext/json/*, test/json/*: Update json-2.0.1.hsbt
Changes of 2.0.0: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2015-09-11-200 Changes of 2.0.1: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2016-07-01-201 [Feature #12542][ruby-dev:49706][fix GH-1395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-11* ext/json/lib/*.rb: Removed some comments. Because these are unnecessaryhsbt
class description. [ci skip][Bug #12255][ruby-core:74835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
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
2015-12-05* ext/json/json.gemspec: bump version to json 1.8.3. CRuby already containedhsbt
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
2015-04-12* ext/json/json.gemspec: bump version to 1.8.2.hsbt
* ext/json/lib/json/version.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* ext/json/*, test/json/*: Reverted r50231. Because it's not works withhsbt
cross-compile environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.hsbt
[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
2015-01-06generic_object.rb: useless methodsnobu
* 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
2014-12-28* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28* ext/json, test/json: merge JSON HEAD(17fe8e7)hsbt
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
2013-11-27* lib/irb/notifier.rb: [Doc] Fix typoa_matsuda
* ext/json/lib/json/common.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-20* ext/json: merge JSON 1.8.1.naruse
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
2013-08-06json/add/range.rb: use Range#endnobu
* 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
2013-07-09fixup stying of `Json#generate` parameter docs by @daveworth [fixes GH-339]hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-12* ext/json: merge JSON 1.7.7.naruse
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
2012-12-12* ext/json: merge JSON 1.7.5.naruse
fix tests and other fixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07* ext/json/lib/json/generic_object.rb: missing file.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07* ext/json: Merge JSON 1.7.1.naruse
https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11Add missing files of r34971,naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11* ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.naruse
[ruby-core:41917] [Bug #5846] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e