diff options
Diffstat (limited to 'ext/kcar/extconf.rb')
-rw-r--r-- | ext/kcar/extconf.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/kcar/extconf.rb b/ext/kcar/extconf.rb index b65846a..ba69c3c 100644 --- a/ext/kcar/extconf.rb +++ b/ext/kcar/extconf.rb @@ -22,4 +22,15 @@ rescue NoMethodError message("no, String#-@ not available\n") end +message('checking if Hash#[]= (rb_hash_aset) dedupes... ') +h = {} +h[%w(m k m f).join('')] = :foo +if 'mkmf'.freeze.equal?(h.keys[0]) + $CPPFLAGS += ' -DHASH_ASET_DEDUPE=1 ' + message("yes\n") +else + $CPPFLAGS += ' -DHASH_ASET_DEDUPE=0 ' + message("no, needs Ruby 2.6+\n") +end + create_makefile("kcar_ext") |