json 2.7.5 → 2.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,33 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
  require 'mkmf'
3
3
 
4
- have_func("rb_enc_raise", "ruby.h")
5
- have_func("rb_enc_interned_str", "ruby.h")
6
-
7
- # checking if String#-@ (str_uminus) dedupes... '
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
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
31
9
 
32
10
  append_cflags("-std=c99")
33
11