summaryrefslogtreecommitdiff
path: root/dev-ruby/json
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
commit77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch)
tree5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /dev-ruby/json
parentbd4aeefe33e63f613512604e47bfca7b2187697d (diff)
gentoo resync : 10.11.2019
Diffstat (limited to 'dev-ruby/json')
-rw-r--r--dev-ruby/json/Manifest3
-rw-r--r--dev-ruby/json/files/json-2.1.0-ruby26-1.patch20
-rw-r--r--dev-ruby/json/files/json-2.1.0-ruby26-2.patch105
-rw-r--r--dev-ruby/json/files/json-2.1.0-ruby26-3.patch143
4 files changed, 0 insertions, 271 deletions
diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest
index 31898e7d0870..f7ad72527290 100644
--- a/dev-ruby/json/Manifest
+++ b/dev-ruby/json/Manifest
@@ -1,7 +1,4 @@
AUX json-1.8.6-heap-exposure.patch 2937 BLAKE2B 204f4c5a16df8fa99ea46e7d29c4a7e8790da9c11ff1dddfeba47b73a3bbf3e06a9243a48fa1d95fc029d21a1031e689b16a91295a1601d4e62a4c18cee2bb3b SHA512 42545c069c8c36b120b63e74b8276b8a6b57237e6cd8ccdeb0e6e9b9acd4f9213e5a4fc35b2f804300e8d00a12546c51b9ef944bde60d679567544de796c87e1
-AUX json-2.1.0-ruby26-1.patch 703 BLAKE2B 13244c273a10ace888376318f0b940aa76dd8e67a46c811d03537fa9718c784a2eba077b7620315e11abd216fc22e34eae6b97f5845aba6433ea3ab79be48c02 SHA512 909d90e619070d33e1c9c3351731f121beee1497d1c0ea8593795b25cda3ce44d11c82244ea98ce9163057820087a81dc6e242b91f95f16bb66c56402811caeb
-AUX json-2.1.0-ruby26-2.patch 2855 BLAKE2B 1d6f31223d8f42883664d9462e49bc7032902972a80348ae0a20363569f6e086110838742702ec3100646e9163c39e8292a8c695a89b7ca157159b70c92dce2c SHA512 8932c773d0b7b479afbf5e110c7fce6605912966aea1c4a23bae9d5a041183001b63a2a52f98d836b892e9ca0709fc1a7ead8e7958ab02d1aefc8ab106fdcffc
-AUX json-2.1.0-ruby26-3.patch 5184 BLAKE2B a2b82163b5827de5c411b439fe179402a37018f7ec4ff64d9be6d3a762aac3a232a40d16af31362ef0ce0ed50a78715f9ec75813790203ac882a25bd22ad0a04 SHA512 49bf7536b319186cb0cad05e8edd66d0db94ba52936e8eb4e8bba22078e283a1d609794166d06d49ed0d26763a9d4ad9a76109ceaca7f24f29b87a6e021b0383
DIST json-1.8.6.gem 144384 BLAKE2B db9e407be4ac7e0cb2e09369637b88f70cdac7a659c600dc83a5390746dfd21b0a5243af62afaeeff013b5a4116a3b22c65a481cad89f1ca9be8904af87d0345 SHA512 8f393da080293965389df4a606e0604c500b4b267897b3c1b9007b7700dde8156f6598c25790e84fa20a7e03c7ae359a0b267c7b84e52dfe2a1ac83cf652ad9b
DIST json-2.1.0.gem 140800 BLAKE2B 28bb5334358369351ec9f13f5fb609ce34eb429cfeffb8dfde70864541516a0c2abd00a640b4647f76dcef198f967456bae0a858a2f213e5a30272c1be1878c7 SHA512 bffbe462e952bca321d4325ecb9c5e9f61e51cad13758581ecfaa6a038bac4e30dc7db50bd897086a5592f6fc437d0e0909f91e279aaf4dd71cf127100c3550b
DIST json-2.2.0.gem 112640 BLAKE2B 973fe22979f4e2fa64a1090e44e5e149029881f20ec2749ce040b79a94610003941f6f3471bbc71e581491df74201bc4201419081c04a03790caaed888dfed1c SHA512 855d5cbeb6e62a7deb009ad454944430c0370cc98c53a1126d8ca3cac4b11a191bfb2ded84a957d4caa0f59cc9b6308e320a58569bddba8d6984078ea34703f2
diff --git a/dev-ruby/json/files/json-2.1.0-ruby26-1.patch b/dev-ruby/json/files/json-2.1.0-ruby26-1.patch
deleted file mode 100644
index e6f76a4be141..000000000000
--- a/dev-ruby/json/files/json-2.1.0-ruby26-1.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-commit bf226a9ac40e2296589004be89b4420b2121e000
-Author: eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
-Date: Fri Aug 3 15:11:22 2018 +0000
-
- Fix missed update of parser source in r62429
-
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
-diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
-index 29900a4a4a..fba01ac0e5 100644
---- a/ext/json/ext/parser/parser.rl
-+++ b/ext/json/ext/parser/parser.rl
-@@ -824,6 +824,7 @@ static VALUE cParser_source(VALUE self)
-
- void Init_parser(void)
- {
-+#undef rb_intern
- rb_require("json/common");
- mJSON = rb_define_module("JSON");
- mExt = rb_define_module_under(mJSON, "Ext");
diff --git a/dev-ruby/json/files/json-2.1.0-ruby26-2.patch b/dev-ruby/json/files/json-2.1.0-ruby26-2.patch
deleted file mode 100644
index 9f1bff9b691e..000000000000
--- a/dev-ruby/json/files/json-2.1.0-ruby26-2.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-commit e7da0fc34e8ed7fa250fc38f1109e4944cbad808
-Author: eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
-Date: Fri Aug 3 15:11:36 2018 +0000
-
- ext/json/parser/parser.c: do not call rb_str_resize() on Time object
-
- * 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
-
-diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
-index b5ed093c1f..c8012796a4 100644
---- a/ext/json/ext/parser/parser.c
-+++ b/ext/json/ext/parser/parser.c
-@@ -1659,7 +1659,9 @@ case 7:
- if (json->symbolize_names && json->parsing_name) {
- *result = rb_str_intern(*result);
- } else {
-- rb_str_resize(*result, RSTRING_LEN(*result));
-+ if (RB_TYPE_P(*result, T_STRING)) {
-+ rb_str_resize(*result, RSTRING_LEN(*result));
-+ }
- }
- if (cs >= JSON_string_first_final) {
- return p + 1;
-@@ -1830,7 +1832,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
- }
-
-
--#line 1834 "parser.c"
-+#line 1836 "parser.c"
- enum {JSON_start = 1};
- enum {JSON_first_final = 10};
- enum {JSON_error = 0};
-@@ -1838,7 +1840,7 @@ enum {JSON_error = 0};
- enum {JSON_en_main = 1};
-
-
--#line 742 "parser.rl"
-+#line 744 "parser.rl"
-
-
- /*
-@@ -1855,16 +1857,16 @@ static VALUE cParser_parse(VALUE self)
- GET_PARSER;
-
-
--#line 1859 "parser.c"
-+#line 1861 "parser.c"
- {
- cs = JSON_start;
- }
-
--#line 758 "parser.rl"
-+#line 760 "parser.rl"
- p = json->source;
- pe = p + json->len;
-
--#line 1868 "parser.c"
-+#line 1870 "parser.c"
- {
- if ( p == pe )
- goto _test_eof;
-@@ -1898,7 +1900,7 @@ st0:
- cs = 0;
- goto _out;
- tr2:
--#line 734 "parser.rl"
-+#line 736 "parser.rl"
- {
- char *np = JSON_parse_value(json, p, pe, &result, 0);
- if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
-@@ -1908,7 +1910,7 @@ st10:
- if ( ++p == pe )
- goto _test_eof10;
- case 10:
--#line 1912 "parser.c"
-+#line 1914 "parser.c"
- switch( (*p) ) {
- case 13: goto st10;
- case 32: goto st10;
-@@ -1997,7 +1999,7 @@ case 9:
- _out: {}
- }
-
--#line 761 "parser.rl"
-+#line 763 "parser.rl"
-
- if (cs >= JSON_first_final && p == pe) {
- return result;
-diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
-index fba01ac0e5..edab32b78f 100644
---- a/ext/json/ext/parser/parser.rl
-+++ b/ext/json/ext/parser/parser.rl
-@@ -554,7 +554,9 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu
- if (json->symbolize_names && json->parsing_name) {
- *result = rb_str_intern(*result);
- } else {
-- rb_str_resize(*result, RSTRING_LEN(*result));
-+ if (RB_TYPE_P(*result, T_STRING)) {
-+ rb_str_resize(*result, RSTRING_LEN(*result));
-+ }
- }
- if (cs >= JSON_string_first_final) {
- return p + 1;
diff --git a/dev-ruby/json/files/json-2.1.0-ruby26-3.patch b/dev-ruby/json/files/json-2.1.0-ruby26-3.patch
deleted file mode 100644
index cf16e235216c..000000000000
--- a/dev-ruby/json/files/json-2.1.0-ruby26-3.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-commit a7e3516ff1116a15b3ed62f55143eceee27c4ce9
-Author: mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
-Date: Sun Dec 2 05:21:57 2018 +0000
-
- Fix JSON::Parser against bigdecimal updates
-
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
-diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
-index c8012796a4..b02aae8fb9 100644
---- a/ext/json/ext/parser/parser.c
-+++ b/ext/json/ext/parser/parser.c
-@@ -91,12 +91,13 @@ static int convert_UTF32_to_UTF8(char *buf, UTF32 ch)
-
- static VALUE mJSON, mExt, cParser, eParserError, eNestingError;
- static VALUE CNaN, CInfinity, CMinusInfinity;
-+static VALUE cBigDecimal = Qundef;
-
- static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
- i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
- i_object_class, i_array_class, i_decimal_class, i_key_p,
- i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
-- i_leftshift, i_new;
-+ i_leftshift, i_new, i_BigDecimal;
-
-
- #line 125 "parser.rl"
-@@ -985,6 +986,19 @@ enum {JSON_float_en_main = 1};
- #line 340 "parser.rl"
-
-
-+static int is_bigdecimal_class(VALUE obj)
-+{
-+ if (cBigDecimal == Qundef) {
-+ if (rb_const_defined(rb_cObject, i_BigDecimal)) {
-+ cBigDecimal = rb_const_get_at(rb_cObject, i_BigDecimal);
-+ }
-+ else {
-+ return 0;
-+ }
-+ }
-+ return obj == cBigDecimal;
-+}
-+
- static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
- {
- int cs = EVIL;
-@@ -1136,7 +1150,11 @@ case 7:
- } else {
- VALUE text;
- text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
-- *result = rb_funcall(json->decimal_class, i_new, 1, text);
-+ if (is_bigdecimal_class(json->decimal_class)) {
-+ *result = rb_funcall(Qnil, i_BigDecimal, 1, text);
-+ } else {
-+ *result = rb_funcall(json->decimal_class, i_new, 1, text);
-+ }
- }
- return p + 1;
- } else {
-@@ -2101,6 +2119,7 @@ void Init_parser(void)
- i_aref = rb_intern("[]");
- i_leftshift = rb_intern("<<");
- i_new = rb_intern("new");
-+ i_BigDecimal = rb_intern("BigDecimal");
- }
-
- /*
-diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
-index edab32b78f..d4e7a60e9d 100644
---- a/ext/json/ext/parser/parser.rl
-+++ b/ext/json/ext/parser/parser.rl
-@@ -89,12 +89,13 @@ static int convert_UTF32_to_UTF8(char *buf, UTF32 ch)
-
- static VALUE mJSON, mExt, cParser, eParserError, eNestingError;
- static VALUE CNaN, CInfinity, CMinusInfinity;
-+static VALUE cBigDecimal = Qundef;
-
- static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
- i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
- i_object_class, i_array_class, i_decimal_class, i_key_p,
- i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
-- i_leftshift, i_new;
-+ i_leftshift, i_new, i_BigDecimal;
-
- %%{
- machine JSON_common;
-@@ -339,6 +340,19 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res
- ) (^[0-9Ee.\-]? @exit );
- }%%
-
-+static int is_bigdecimal_class(VALUE obj)
-+{
-+ if (cBigDecimal == Qundef) {
-+ if (rb_const_defined(rb_cObject, i_BigDecimal)) {
-+ cBigDecimal = rb_const_get_at(rb_cObject, i_BigDecimal);
-+ }
-+ else {
-+ return 0;
-+ }
-+ }
-+ return obj == cBigDecimal;
-+}
-+
- static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
- {
- int cs = EVIL;
-@@ -357,7 +371,11 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul
- } else {
- VALUE text;
- text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
-- *result = rb_funcall(json->decimal_class, i_new, 1, text);
-+ if (is_bigdecimal_class(json->decimal_class)) {
-+ *result = rb_funcall(Qnil, i_BigDecimal, 1, text);
-+ } else {
-+ *result = rb_funcall(json->decimal_class, i_new, 1, text);
-+ }
- }
- return p + 1;
- } else {
-@@ -861,6 +879,7 @@ void Init_parser(void)
- i_aref = rb_intern("[]");
- i_leftshift = rb_intern("<<");
- i_new = rb_intern("new");
-+ i_BigDecimal = rb_intern("BigDecimal");
- }
-
- /*
-diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb
-index 5f454eb121..68aeb572bb 100644
---- a/tests/json_parser_test.rb
-+++ b/tests/json_parser_test.rb
-@@ -110,8 +110,8 @@ def test_parse_numbers
- end
-
- def test_parse_bigdecimals
-- assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class)
-- assert_equal(BigDecimal.new("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
-+ assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class)
-+ assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
- end
-
- if Array.method_defined?(:permutation)