Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Some more changes from ruby 2.7.0merge-recent-ruby-changes | Florian Frank | 2019-12-10 | 1 | -3/+10 |
| | |||||
* | Merge branch 'master' of github.com:flori/json | Florian Frank | 2019-04-29 | 1 | -2/+22 |
|\ | |||||
| * | Add some missing ruby 2.6 changes | Florian Frank | 2019-02-21 | 1 | -8/+10 |
| | | |||||
| * | Fix for bigdecimal updates | Kenta Murata | 2019-02-21 | 1 | -2/+19 |
| | | | | | | | | `BigDecimal.new` is no longer available from bigdecimal-1.4.0. | ||||
| * | ext/json/parser/parser.c: do not call rb_str_resize() on Time objectpick-ruby-core | eregon | 2018-10-25 | 1 | -1/+3 |
| | | | | | | | | | | | | * See https://github.com/flori/json/issues/342 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | ||||
| * | Fix missed update of parser source in r62429 | eregon | 2018-10-25 | 1 | -0/+1 |
| | | | | | | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | ||||
* | | Only attempt to resize strings not other objects | Florian Frank | 2019-04-29 | 1 | -1/+1 |
|/ | |||||
* | Test the new feature and fix problems | Florian Frank | 2017-04-18 | 1 | -2/+2 |
| | | | | | | - Initialize i_new - Add to changes - Test on ruby 2.4.1 | ||||
* | Raise exception | Florian Frank | 2017-04-18 | 1 | -2/+10 |
| | | | | for incomplete unicode surrogates/character escape sequences | ||||
* | Support some older internal Ruby API (<2.0) | Florian Frank | 2017-01-12 | 1 | -1/+1 |
| | |||||
* | Merge decimal_class patch by Michael Jaschob | Florian Frank | 2016-09-23 | 1 | -3/+20 |
| | | | | | | Also: - Avoid some issues with bundler - Avoid some issues with jruby | ||||
* | Fix issue #296 when parsing frozen strings | Florian Frank | 2016-07-26 | 1 | -0/+3 |
| | |||||
* | Stores current nesting on stack | Florian Frank | 2016-07-01 | 1 | -17/+12 |
| | |||||
* | Exception encoding | Nobuyoshi Nakada | 2016-06-21 | 1 | -1/+1 |
| | | | | Raise with messages in UTF-8 encoding. | ||||
* | Remove unnecessary conversion | Nobuyoshi Nakada | 2016-06-21 | 1 | -1/+0 |
| | | | | StringValue does the conversion. | ||||
* | resize strings after parsing | Aaron Patterson | 2016-06-21 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser uses `rb_str_buf_new` to allocate new strings. `rb_str_buf_new` [has a minimum size of 128 and is not an embedded string](https://github.com/ruby/ruby/blob/9949407fd90c1c5bfe332141c75db995a9b867aa/string.c#L1119-L1135). This causes applications that parse JS to allocate extra memory when parsing short strings. For a real-world example, we can use the mime-types gem. The mime-types gem stores all mime types inside a JSON file and parses them when you require the gem. Here is a sample program: ```ruby require 'objspace' require 'mime-types' GC.start GC.start p ObjectSpace.memsize_of_all String ``` The example program loads the mime-types gem and outputs the total space used by all strings. Here are the results of the program before and after this patch: ** Before ** ``` [aaron@TC json (memuse)]$ ruby test.rb 5497494 [aaron@TC json (memuse)]$ ``` ** After ** ``` [aaron@TC json (memuse)]$ ruby -I lib:ext test.rb 3335862 [aaron@TC json (memuse)]$ ``` This change results in a ~40% reduction of memory use for strings in the mime-types gem. Thanks @matthewd for finding the problem, and @nobu for the patch! | ||||
* | Merge more changes from ruby core | Florian Frank | 2016-06-21 | 1 | -22/+37 |
| | |||||
* | Force ASCII 8bit to be UTF-8 and hope for the best | Florian Frank | 2016-06-03 | 1 | -6/+10 |
| | |||||
* | Disallow usage of symbolize_names and create_additions | Florian Frank | 2015-06-15 | 1 | -2/+8 |
| | |||||
* | Ext parser is green now as well | Florian Frank | 2015-06-15 | 1 | -101/+17 |
| | |||||
* | Remove byte sniffing from Ext::Parser | Florian Frank | 2015-06-13 | 1 | -39/+4 |
| | |||||
* | parser.rl: allocate structs with wrapper | nobu | 2015-05-28 | 1 | -10/+4 |
| | | | | | | | | * ext/json/ext/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 | ||||
* | use ZALLOC if it can be used, and defined ZALLOC macro. | SHIBATA Hiroshi | 2015-02-12 | 1 | -2/+1 |
| | |||||
* | sync trunk again: fixed regression of r49027 | SHIBATA Hiroshi | 2015-02-12 | 1 | -5/+5 |
| | |||||
* | Fall back to Data_* wrappers on ancient rubies | Florian Frank | 2015-01-02 | 1 | -1/+3 |
| | |||||
* | Merge branch 'ruby-2.2' of https://github.com/zzak/json into zzak-ruby-2.2 | Florian Frank | 2015-01-02 | 1 | -4/+21 |
|\ | | | | | | | | | | | | | Conflicts: .travis.yml json.gemspec json_pure.gemspec | ||||
| * | RUBY_TYPED_FREE_IMMEDIATELY isn't always available | Zachary Scott | 2014-12-27 | 1 | -0/+2 |
| | | |||||
| * | Sync with trunk | Zachary Scott | 2014-12-25 | 1 | -5/+20 |
| | | |||||
| * | - Pass over generator.c for grammar fixes. | Vipul A M | 2014-07-03 | 1 | -1/+1 |
| | | | | | | | | - Typo fixes across json ext | ||||
* | | Fix documentation wording | Florian Frank | 2014-07-03 | 1 | -1/+1 |
|/ | |||||
* | Security fix create_additons/JSON::GenericObjectv1.7.7 | Florian Frank | 2013-02-11 | 1 | -1/+1 |
| | |||||
* | Change actual rl filessferik-max_nesting | Florian Frank | 2012-10-07 | 1 | -3/+3 |
| | |||||
* | Throw exception unless source is a string | Florian Frank | 2012-04-27 | 1 | -0/+1 |
| | |||||
* | The behavior of reference to inner defined variable is undefined. | NARUSE, Yui | 2012-01-15 | 1 | -1/+1 |
| | | | | | https://bugs.ruby-lang.org/issues/5888 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862 | ||||
* | Support hash ducktype objects on JRuby as well | Florian Frank | 2011-12-20 | 1 | -5/+5 |
| | |||||
* | Support object class with duck type hash | Florian Frank | 2011-12-20 | 1 | -2/+8 |
| | |||||
* | Move fbuffer in its own directory | Florian Frank | 2011-11-28 | 1 | -1/+1 |
| | |||||
* | avoid symlink | Florian Frank | 2011-11-23 | 1 | -1/+1 |
| | |||||
* | Extract fbuffer and use it in parser and generator | Florian Frank | 2011-11-23 | 1 | -2/+11 |
| | |||||
* | always raise type error when parsing nil | Florian Frank | 2011-11-03 | 1 | -0/+1 |
| | |||||
* | Implement quirks_mode | Florian Frank | 2011-07-27 | 1 | -53/+124 |
| | | | | This allows parsing of primitive values | ||||
* | Duplicate the argument of convert_encoding() only. | Nobuyoshi Nakada | 2011-07-08 | 1 | -0/+1 |
| | |||||
* | Adjust indent. | Nobuyoshi Nakada | 2011-07-08 | 1 | -2/+2 |
| | |||||
* | no force_encoding | Nobuyoshi Nakada | 2011-07-08 | 1 | -15/+5 |
| | | | | | * ext/json/ext/parser/parser.rl (JSON_parse_string): no needs to use force_encoding. | ||||
* | * ext/json/ext/parser/parser.h (GET_PARSER): raise TypeError. | nobu | 2011-07-07 | 1 | -1/+1 |
| | | | | | | * 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 | ||||
* | * ext/json/ext/parser/parser.h (GET_PARSER): check if initialized. ↵ | nobu | 2011-07-07 | 1 | -1/+6 |
| | | | | | | | | [ruby-core:35079] * ext/json/ext/parser/parser.rl (cParser_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | ||||
* | * ext/json/ext/parser/parser.rl: add local variables for emacs. | nobu | 2011-07-07 | 1 | -10/+17 |
| | | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | ||||
* | clean up superflous tabs | Florian Frank | 2011-06-15 | 1 | -6/+6 |
| | |||||
* | Don't optimize calls for ducktypes | Florian Frank | 2011-05-12 | 1 | -3/+9 |
| | |||||
* | If a custom :object_class is given, the C extension should not use ↵ | Jon Leighton | 2011-05-11 | 1 | -1/+5 |
| | | | | rb_hash_aset - it should call the object's []= method instead. |