Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added backword compatible for < json-2.5 | Hiroshi SHIBATA | 2020-12-22 | 1 | -0/+2 |
| | |||||
* | 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 |
| | |||||
* | 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 |
| | |||||
* | 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 | 1 | -1/+2 |
|\ | | | | | Add an option to escape forward slash character | ||||
| * | Add an option to escape forward slash character | Jean Boussier | 2020-07-04 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 |
| | | |||||
* | | Add `load_file` and `load_file!` methods, with tests. Fixes issue #386. | Keith Bennett | 2020-06-30 | 1 | -0/+10 |
|/ | |||||
* | Added :call-seq: to RDOc for some methods | BurdetteLamar | 2020-06-28 | 1 | -0/+12 |
| | |||||
* | 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 |
| | |||||
* | Enchance generic JSON and #generate docs | zverok | 2019-12-29 | 1 | -13/+16 |
| | |||||
* | 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. | ||||
* | Fix problem when Parser is defined on top level | Florian Frank | 2016-07-01 | 1 | -1/+1 |
| | | | | See flori/json#287 | ||||
* | Add frozen_string_literal: false | Nobuyoshi Nakada | 2016-06-21 | 1 | -0/+1 |
| | | | | When you change this to true, you may need to add more tests. | ||||
* | Test common interface | Florian Frank | 2016-06-03 | 1 | -14/+4 |
| | |||||
* | Use better name for this feature | Florian Frank | 2016-06-02 | 1 | -4/+4 |
| | |||||
* | Remove quirks mode | Florian Frank | 2016-06-02 | 1 | -5/+4 |
| | |||||
* | Change rfc reference | Florian Frank | 2016-06-02 | 1 | -23/+5 |
| | |||||
* | Refactor tests and make pure parser green | Florian Frank | 2015-06-15 | 1 | -10/+10 |
| | |||||
* | Merge branch 'master' into zzak-ruby-2.2 | Florian Frank | 2015-01-02 | 1 | -4/+4 |
|\ | |||||
| * | Don't mutate JSON.dump_default_options from dump | Jason R. Clark | 2015-01-02 | 1 | -1/+1 |
| | | | | | | | | | | | | | | The use of Hash#update from the JSON.dump method was mutating the dump_default_options hash on any call to dump with a limit provided. An individual method call with an overriding value shouldn't update the defaults in this way. | ||||
| * | Change documentation to reflect new default value | Florian Frank | 2015-01-02 | 1 | -2/+2 |
| | | |||||
| * | Fix typo in comment | Ignacio Galindo | 2015-01-02 | 1 | -1/+1 |
| | | |||||
* | | Sync with trunk | Zachary Scott | 2014-12-25 | 1 | -5/+5 |
| | | |||||
* | | Don't mutate JSON.dump_default_options from dump | Jason R. Clark | 2014-09-19 | 1 | -1/+1 |
| | | | | | | | | | | | | | | The use of Hash#update from the JSON.dump method was mutating the dump_default_options hash on any call to dump with a limit provided. An individual method call with an overriding value shouldn't update the defaults in this way. | ||||
* | | Change documentation to reflect new default value | Florian Frank | 2014-04-01 | 1 | -2/+2 |
| | | |||||
* | | Fix typo in comment | Ignacio Galindo | 2013-10-31 | 1 | -1/+1 |
|/ | |||||
* | Removed unnecessary and incorrect condition for Rubinius. | Brian Shirai | 2013-09-21 | 1 | -4/+1 |
| | |||||
* | Security fix create_additons/JSON::GenericObjectv1.7.7 | Florian Frank | 2013-02-11 | 1 | -7/+14 |
| | |||||
* | Increase default max_nesting to 100 | Erik Michaels-Ober | 2012-10-05 | 1 | -2/+2 |
| | | | | See discussion at https://github.com/intridea/multi_json/pull/59. | ||||
* | Implement work around for rbx encoding problemworkaround-rbx-encoding-issues | Florian Frank | 2012-05-12 | 1 | -1/+4 |
| | |||||
* | Fix string/regexp encoding mismatch in jruby | Florian Frank | 2012-05-10 | 1 | -1/+7 |
| | |||||
* | Add JSON::GenericObject | Florian Frank | 2012-04-28 | 1 | -1/+1 |
| | |||||
* | Add implementation for a light object | Florian Frank | 2012-04-27 | 1 | -0/+1 |
| | |||||
* | Small fix: JSON.load('') # => nil | Florian Frank | 2011-12-01 | 1 | -1/+2 |
| | |||||
* | Make JSON.dump and JSON.load support Rails better | Florian Frank | 2011-11-22 | 1 | -4/+38 |
| | |||||
* | probe for read before calling it | Florian Frank | 2011-11-03 | 1 | -1/+1 |
| | |||||
* | Merge branch 'quirks-mode' | Florian Frank | 2011-08-29 | 1 | -3/+15 |
|\ |