Sha256: b7e06d7195dac745d3578355c7563f4cc0da7c10cf2913b73db15cbd1008db6a
Contents?: true
Size: 798 Bytes
Versions: 8
Compression:
Stored size: 798 Bytes
Contents
# frozen_string_literal: true require 'mkmf' have_func("rb_enc_raise", "ruby.h") have_func("rb_enc_interned_str", "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 append_cflags("-std=c99") create_makefile 'json/ext/parser'
Version data entries
8 entries across 8 versions & 2 rubygems