Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Bump version to 2.6.3v2.6.3 | Hiroshi SHIBATA | 2022-12-05 | 1 | -1/+1 |
| | |||||
* | Merge pull request #483 from notEthan/unicode_mixed | Hiroshi SHIBATA | 2022-06-14 | 1 | -1/+1 |
|\ | | | | | bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError | ||||
| * | fix parsing of unicode, mixing literal characters with escaped, by forcing ↵ | Ethan | 2022-02-08 | 1 | -1/+1 |
| | | | | | | | | encoding back to ASCII_8BIT before gsubing back into parse_string result | ||||
* | | Bump version to 2.6.2 | Florian Frank | 2022-05-16 | 1 | -1/+1 |
|/ | |||||
* | Bump version to v2.6.1v2.6.1 | Hiroshi SHIBATA | 2021-10-24 | 1 | -1/+1 |
| | |||||
* | Bump JSON::VERSION to 2.6.0. | Josef Šimánek | 2021-10-24 | 1 | -1/+1 |
| | |||||
* | Fix some typos | Ryuta Kamizono | 2021-04-26 | 1 | -1/+1 |
| | |||||
* | Bump version to 2.5.1v2.5.1 | Hiroshi SHIBATA | 2020-12-22 | 1 | -1/+1 |
| | |||||
* | Added backword compatible for < json-2.5 | Hiroshi SHIBATA | 2020-12-22 | 1 | -0/+2 |
| | |||||
* | Bump version to 2.5.0v2.5.0 | Hiroshi SHIBATA | 2020-12-22 | 1 | -1/+1 |
| | |||||
* | Workaround for JRuby | Hiroshi SHIBATA | 2020-12-22 | 1 | -0/+1 |
| | |||||
* | [json] Avoid method redefinition | Kenta Murata | 2020-12-22 | 1 | -9/+9 |
| | |||||
* | [json] Make JSON.create_id thread-safe | Kenta Murata | 2020-12-22 | 1 | -1/+14 |
| | |||||
* | [json] Stop using prototype objects | Kenta Murata | 2020-12-22 | 1 | -8/+13 |
| | |||||
* | Bump version to json-2.4.1v2.4.1 | Hiroshi SHIBATA | 2020-12-17 | 1 | -1/+1 |
| | |||||
* | Update version.rb from rake version task | Hiroshi SHIBATA | 2020-12-17 | 1 | -1/+1 |
| | |||||
* | Complex and Rational is embedded classes now | Hiroshi SHIBATA | 2020-11-12 | 2 | -2/+0 |
| | |||||
* | Merge pull request #447 from Shopify/global-freeze-option | Hiroshi SHIBATA | 2020-10-20 | 1 | -0/+14 |
|\ | | | | | Implement a freeze: parser option | ||||
| * | Implement a freeze: parser option | Jean Boussier | 2020-09-15 | 1 | -0/+14 |
| | | | | | | | | | | | | | | If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it. | ||||
* | | Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵ | Chris Seaton | 2020-10-07 | 1 | -2/+4 |
| | | | | | | | | implementations | ||||
* | | Fix JSON.load_file doc | Jean Boussier | 2020-09-09 | 1 | -3/+3 |
|/ | |||||
* | Partial compliance with doc/method_documentation.rdoc | BurdetteLamar | 2020-08-20 | 1 | -17/+7 |
| | |||||
* | Merge pull request #425 from marcandre/fix_pure_parser | Hiroshi SHIBATA | 2020-08-14 | 1 | -2/+6 |
|\ | | | | | Fix pure parser with unclosed arrays / objects [Fix #314] | ||||
| * | Fix pure parser with unclosed arrays / objects [Fix #314] | Marc-Andre Lafortune | 2020-06-30 | 1 | -2/+6 |
| | | |||||
* | | Enhanced RDoc for JSON.dump (#443) | Burdette Lamar | 2020-08-14 | 1 | -11/+23 |
| | | | | | | * Enhanced RDoc for JSON.dump | ||||
* | | Merge pull request #405 from Shopify/escape-slash-2.3.0 | NARUSE, Yui | 2020-07-31 | 2 | -7/+26 |
|\ \ | | | | | | | Add an option to escape forward slash character | ||||
| * | | Add an option to escape forward slash character | Jean Boussier | 2020-07-04 | 2 | -7/+26 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | | | Nodoc for recurse_proc | BurdetteLamar | 2020-07-29 | 1 | -1/+1 |
| | | | |||||
* | | | RDoc for JSON.load with proc | BurdetteLamar | 2020-07-28 | 1 | -18/+58 |
| | | | |||||
* | | | RDoc example for JSON.load | BurdetteLamar | 2020-07-04 | 1 | -13/+87 |
| | | | |||||
* | | | Enhance RDoc for JSON.parse | BurdetteLamar | 2020-07-03 | 1 | -9/+40 |
|/ / | |||||
* | | Merge pull request #430 from BurdetteLamar/master | Hiroshi SHIBATA | 2020-07-02 | 1 | -177/+10 |
|\ \ | | | | | | | Move options from #generate and #parse to common area | ||||
| * | | Move options from #generate and #parse to common area | BurdetteLamar | 2020-06-30 | 1 | -177/+10 |
| |/ | |||||
* | | Bump version to 2.3.1v2.3.1 | Hiroshi SHIBATA | 2020-07-01 | 1 | -1/+1 |
| | | |||||
* | | Add `load_file` and `load_file!` methods, with tests. Fixes issue #386. | Keith Bennett | 2020-06-30 | 1 | -0/+10 |
| | | |||||
* | | Fix alignment | Marc-Andre Lafortune | 2020-06-30 | 1 | -1/+1 |
|/ | |||||
* | Added :call-seq: to RDOc for some methods | BurdetteLamar | 2020-06-28 | 1 | -0/+12 |
| | |||||
* | Merge pull request #413 from BurdetteLamar/master | Hiroshi SHIBATA | 2020-06-28 | 1 | -92/+312 |
|\ | | | | | Rdoc enhancements | ||||
| * | RDoc enhancements | BurdetteLamar | 2020-06-25 | 1 | -17/+1 |
| | | |||||
| * | RDoc enhancements | BurdetteLamar | 2020-06-25 | 1 | -6/+6 |
| | | |||||
| * | RDoc enhancements | BurdetteLamar | 2020-06-25 | 1 | -26/+1 |
| | | |||||
| * | Rdoc enhancements | BurdetteLamar | 2020-05-06 | 1 | -92/+353 |
| | | |||||
* | | Merge pull request #191 from jkanywhere/spell-fixes | Hiroshi SHIBATA | 2020-06-25 | 2 | -2/+2 |
|\ \ | |/ |/| | Spelling and grammar fixes for comments. | ||||
| * | Spelling and grammar fixes for comments. | Josh Kline | 2013-12-28 | 2 | -2/+2 |
| | | |||||
* | | Enchance generic JSON and #generate docs | zverok | 2019-12-29 | 1 | -13/+16 |
| | | |||||
* | | Bump versions for 2.3.0. | Charles Oliver Nutter | 2019-12-09 | 1 | -1/+1 |
| | | |||||
* | | Merge branch 'zenspider/ruby-2.7' of https://github.com/zenspider/json into ↵ | Hiroshi SHIBATA | 2019-11-29 | 2 | -2/+11 |
|\ \ | | | | | | | | | | zenspider-zenspider/ruby-2.7 | ||||
| * | | Fix warning from trying to access an uninitialized ivar. | Ryan Davis | 2019-11-27 | 1 | -1/+2 |
| | | | | | | | | | | | | Signed-off-by: Ryan Davis <zenspider@chef.io> | ||||
| * | | Minor cleanup for ruby 2.7 warnings and failures. | Ryan Davis | 2019-11-27 | 2 | -3/+12 |
| | | | |||||
* | | | Make rb_scan_args handle keywords more similar to Ruby methods (#2460) | Jeremy Evans | 2019-10-31 | 1 | -2/+2 |
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. |