summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge remote-tracking branch 'nobu/no-Bignum'Florian Frank2016-09-092-3/+4
|\ \ \
| * | | Get rid of use of Bignum, obsolete nameNobuyoshi Nakada2016-09-091-2/+3
| |/ /
| * | Merge pull request #300 from kAworu/patch-1Florian Frank2016-07-291-1/+1
| |\ \ | | | | | | | | README.md typo fix
| | * | README.md typo fixAlexandre Perrin2016-07-291-1/+1
| |/ /
* | | Add change to CHANGESv2.0.2Florian Frank2016-07-261-0/+4
|/ /
* | Merge branch 'master' of github.com:flori/jsonFlorian Frank2016-07-264-6/+7
|\ \
| * \ Merge pull request #294 from hsbt/use-assert-raiseFlorian Frank2016-07-141-3/+3
| |\ \ | | | | | | | | Fix inconsistency usage for assertion methods
| | * | Fix inconsistency usage for assertion methodsSHIBATA Hiroshi2016-07-141-3/+3
| |/ /
| * | Merge pull request #292 from nobu/patch-1Florian Frank2016-07-131-0/+1
| |\ \ | | | | | | | | Suppress a warning
| | * | Suppress a warningNobuyoshi Nakada2016-07-081-0/+1
| | | | | | | | | | | | Suppress a unused-but-set-variable warning by gcc.
| * | | Merge pull request #293 from lencioni/patch-1Florian Frank2016-07-131-1/+1
| |\ \ \ | | |/ / | |/| | Fix typo "improvemed" => "improved"
| | * | Fix typo "improvemed" => "improved"Joe Lencioni2016-07-121-1/+1
| |/ /
| * | Merge pull request #290 from chottoda/fix-typo-rfc7159Florian Frank2016-07-051-2/+2
| |\ \ | | | | | | | | (README.md) Now complies to newest JSON RFC 7159.
| | * | [Now complies to newest JSON RFC ↵chottoda2016-07-051-2/+2
| |/ / | | | | | | | | | 7159.](https://github.com/chottoda/json/blob/master/CHANGES.md#2015-09-11-200)
* | | Fix issue #296 when parsing frozen stringsFlorian Frank2016-07-269-84/+103
| | |
* | | Add required_ruby_version to json_pure specFlorian Frank2016-07-193-1/+3
| | |
* | | Test parsing some simple singular valuesFlorian Frank2016-07-071-1/+12
|/ /
* | Bump version to 2.0.1v2.0.1Florian Frank2016-07-014-5/+5
| |
* | Rename to be shorterFlorian Frank2016-07-011-0/+0
| |
* | Use markdown for CHANGESFlorian Frank2016-07-011-93/+154
| |
* | Fix problem when Parser is defined on top levelFlorian Frank2016-07-011-1/+1
| | | | | | | | See flori/json#287
* | Add to CHANGESFlorian Frank2016-07-011-0/+3
| |
* | Stores current nesting on stackFlorian Frank2016-07-013-87/+76
| |
* | RB_GC_GUARD to protect from premature GCPete Johns2016-07-011-0/+1
| | | | | | | | https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#appendix-e-rb_gc_guard-to-protect-from-premature-gc
* | Add to CHANGESv2.0.0Florian Frank2016-07-013-23/+26
| |
* | And stay thereFlorian Frank2016-06-225-2/+3
| |
* | Stop testing on 1.9.3Florian Frank2016-06-211-1/+0
| |
* | Add ruby version requirement to gemspecFlorian Frank2016-06-212-0/+1
| |
* | Make it interactiveFlorian Frank2016-06-211-2/+9
| |
* | Merge branch 'nobu-trunk'Florian Frank2016-06-2132-112/+147
|\ \
| * | Fix some merge problemsFlorian Frank2016-06-215-145/+20
| | |
| * | Support 1.9 ruby's OpenStructFlorian Frank2016-06-211-0/+8
| | |
| * | Add frozen_string_literal: falseNobuyoshi Nakada2016-06-2127-0/+27
| | | | | | | | | | | | When you change this to true, you may need to add more tests.
| * | Optional hash in rb_scan_argsNobuyoshi Nakada2016-06-211-0/+32
| | | | | | | | | | | | | | | Use ':' in rb_scan_args to get optional hash, which available since ruby 2.1.
| * | Exception encodingNobuyoshi Nakada2016-06-213-2/+44
| | | | | | | | | | | | Raise with messages in UTF-8 encoding.
| * | Use rb_encodingNobuyoshi Nakada2016-06-212-89/+68
| | | | | | | | | | | | Use rb_encoding functions to convert encodings.
| * | Remove unnecessary conversionNobuyoshi Nakada2016-06-212-2/+32
| | | | | | | | | | | | StringValue does the conversion.
| * | Use enumNobuyoshi Nakada2016-06-212-8/+58
| | | | | | | | | | | | | | | Use `enum` instead of `static const int` to get rid of unused-const-variable warnings.
| * | Use assert_raise consistentlyNobuyoshi Nakada2016-06-215-47/+47
| | |
| * | Remove useless methodsNobuyoshi Nakada2016-06-211-8/+0
| | | | | | | | | | | | | | | Remove useless overriding methods, [] and []=, which are same as OpenStruct.
| * | Append newline at EOFNobuyoshi Nakada2016-06-211-1/+1
| | |
| * | regenerate parserAaron Patterson2016-06-211-0/+2
| | |
| * | resize strings after parsingAaron Patterson2016-06-211-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 branch 'master' of github.com:flori/jsonFlorian Frank2016-06-212-0/+4
|\ \ \ | |/ / |/| |
| * | Merge pull request #260 from tenderlove/memuseFlorian Frank2016-06-112-0/+4
| |\ \ | | | | | | | | resize strings after parsing
| | * | regenerate parserAaron Patterson2016-06-111-0/+2
| | | |
| | * | resize strings after parsingAaron Patterson2016-06-111-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 coreFlorian Frank2016-06-215-138/+171
| | |
* | | Easy diffingFlorian Frank2016-06-211-0/+11
| | |
* | | Adapt to ruby integer unificationFlorian Frank2016-06-212-3/+43
|/ /