Sha256: 8733d7bf9a2111d865df0d3b4a9244b7b5879f9b07e45ce00d1e467bb216c119

Contents?: true

Size: 729 Bytes

Versions: 11

Compression:

Stored size: 729 Bytes

Contents

# frozen_string_literal: false
require 'mkmf'

have_func("rb_enc_raise", "ruby.h")

# checking if String#-@ (str_uminus) dedupes... '
begin
  a = -(%w(t e s t).join)
  b = -(%w(t e s t).join)
  if a.equal?(b)
    $CFLAGS << ' -DSTR_UMINUS_DEDUPE=1 '
  else
    $CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
  end
rescue NoMethodError
  $CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
end

# checking if String#-@ (str_uminus) directly interns frozen strings... '
begin
  s = rand.to_s.freeze
  if (-s).equal?(s) && (-s.dup).equal?(s)
    $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=1 '
  else
    $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
  end
rescue NoMethodError
  $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
end

create_makefile 'json/ext/parser'

Version data entries

11 entries across 10 versions & 4 rubygems

Version Path
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
cloudsmith-api-0.57.1 vendor/bundle/ruby/2.6.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/json-2.5.1/ext/json/ext/parser/extconf.rb
json-2.5.1 ext/json/ext/parser/extconf.rb
json-2.5.0 ext/json/ext/parser/extconf.rb
json-2.4.1 ext/json/ext/parser/extconf.rb
json_pure-2.4.0 ext/json/ext/parser/extconf.rb
json-2.4.0 ext/json/ext/parser/extconf.rb