json 2.7.2 → 2.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BSDL +22 -0
- data/CHANGES.md +73 -17
- data/LEGAL +60 -0
- data/README.md +15 -236
- data/ext/json/ext/fbuffer/fbuffer.h +76 -79
- data/ext/json/ext/generator/extconf.rb +8 -2
- data/ext/json/ext/generator/generator.c +776 -816
- data/ext/json/ext/parser/extconf.rb +7 -27
- data/ext/json/ext/parser/parser.c +1697 -670
- data/ext/json/ext/parser/parser.rl +832 -338
- data/json.gemspec +45 -49
- data/lib/json/add/bigdecimal.rb +2 -2
- data/lib/json/add/complex.rb +1 -1
- data/lib/json/add/core.rb +1 -1
- data/lib/json/add/date.rb +1 -1
- data/lib/json/add/date_time.rb +1 -1
- data/lib/json/add/exception.rb +1 -1
- data/lib/json/add/ostruct.rb +1 -1
- data/lib/json/add/range.rb +1 -1
- data/lib/json/add/rational.rb +1 -1
- data/lib/json/add/regexp.rb +1 -1
- data/lib/json/add/struct.rb +1 -1
- data/lib/json/add/symbol.rb +1 -2
- data/lib/json/add/time.rb +3 -10
- data/lib/json/common.rb +273 -95
- data/lib/json/ext/generator/state.rb +105 -0
- data/lib/json/ext.rb +13 -5
- data/lib/json/generic_object.rb +1 -1
- data/lib/json/{pure → truffle_ruby}/generator.rb +228 -120
- data/lib/json/version.rb +3 -7
- data/lib/json.rb +16 -21
- metadata +19 -21
- data/ext/json/ext/generator/depend +0 -1
- data/ext/json/ext/generator/generator.h +0 -177
- data/ext/json/ext/parser/depend +0 -1
- data/ext/json/ext/parser/parser.h +0 -96
- data/ext/json/extconf.rb +0 -3
- data/lib/json/pure/parser.rb +0 -337
- data/lib/json/pure.rb +0 -15
- /data/{LICENSE → COPYING} +0 -0
@@ -1,32 +1,12 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
|
-
have_func("
|
5
|
-
have_func("
|
4
|
+
have_func("rb_enc_interned_str", "ruby.h") # RUBY_VERSION >= 3.0
|
5
|
+
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
|
6
|
+
have_func("rb_gc_mark_locations", "ruby.h") # Missing on TruffleRuby
|
7
|
+
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
|
8
|
+
have_func("rb_category_warn", "ruby.h") # Missing on TruffleRuby
|
6
9
|
|
7
|
-
|
8
|
-
begin
|
9
|
-
a = -(%w(t e s t).join)
|
10
|
-
b = -(%w(t e s t).join)
|
11
|
-
if a.equal?(b)
|
12
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE=1 '
|
13
|
-
else
|
14
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
|
15
|
-
end
|
16
|
-
rescue NoMethodError
|
17
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
|
18
|
-
end
|
19
|
-
|
20
|
-
# checking if String#-@ (str_uminus) directly interns frozen strings... '
|
21
|
-
begin
|
22
|
-
s = rand.to_s.freeze
|
23
|
-
if (-s).equal?(s) && (-s.dup).equal?(s)
|
24
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=1 '
|
25
|
-
else
|
26
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
|
27
|
-
end
|
28
|
-
rescue NoMethodError
|
29
|
-
$CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
|
30
|
-
end
|
10
|
+
append_cflags("-std=c99")
|
31
11
|
|
32
12
|
create_makefile 'json/ext/parser'
|